record_image — Get an image tag for a record.¶
Summary¶
- record_image($record, $imageType, $props = array())¶
Get an image tag for a record.
Parameters: - $record (Omeka_Record_AbstractRecord|string) –
- $imageType (string) – Image size: thumbnail, square thumbnail, fullsize
- $props (array) – HTML attributes for the img tag
Returns: string
Usage¶
Examples¶
Get the image associated with an individual record, such as a collection or an exhibit. Use the $imageType string to set the image size.
<?php if ($collectionImage = record_image('collection', 'square_thumbnail')): ?>
<?php echo link_to_collection($collectionImage, array('class' => 'image')); ?>
<?php endif; ?>