file_image
— Get a customized file image tag.
Added in version 2.2.
Summary
- file_image($imageType, $props = array(), $file = null)
Get a customized file image tag.
- Parameters:
$imageType (
string
) – Image size: thumbnail, square thumbnail, fullsize$props (
array
) – HTML attributes for the img tag.$file
Usage
Display the image files and assign css selectors.
Takes a string for the image size and an array of html attributes.
Valid strings for $imageType
include:
thumbnail
square_thumbnail
fullsize
original
Examples
Display a square thumbnail for an item and wrap it with class = "thumbnail"
<div class="item-collapsed">
<?php echo file_image('square_thumbnail', array('class' => 'thumbnail'), $file); ?>
</div>