1<?php 2/** 3 * Elgg image view 4 * 5 * @uses string $vars['src'] The image src url (required). 6 * @uses string $vars['alt'] The alternate text for the image (required). 7 */ 8 9$src = elgg_extract('src', $vars); 10if (empty($src)) { 11 return; 12} 13 14if (!isset($vars['alt'])) { 15 elgg_log("The view output/img requires that the alternate text be set.", 'NOTICE'); 16} 17 18$vars['src'] = elgg_normalize_url($src); 19 20echo elgg_format_element('img', $vars); 21