This wiki will show you how to access image from view templates.
Here, is the syntax:
echo $this->htProfileImage($user, $attributes, $options);
Where,
-
$user
is the instance of user entity class of ZfcUser -
$attributes
is an associative array of attributes to apply toimg
element. (optional) -
$options
is associative array of options (optional)
For Example,
echo $this->htProfileImage($this->zfcUserIdentity(), array('class' => 'my-awesome-class'), array('filter' => 'my-awesome-filter')); //
Note: if filter is not provided, then this will be used as default
This will output something similiar to
<img src='url/of/image' class='my-awesome-class'>
When, you only have user_id
, you can also access the image, such as
echo $this->htProfileImage($userId);