theme_image_style($variables)Return a themed image using a specific image style.
ingroup themeable
$variables An associative array containing:
A string containing the image tag.
modules/image/image.module, line 1031
<?php
function theme_image_style($variables) {
$style_name = $variables['style_name'];
$path = $variables['path'];
// theme_image() can only honor the $getsize parameter with local file paths.
// The derivative image is not created until it has been requested so the file
// may not yet exist, in this case we just fallback to the URL.
$style_path = image_style_path($style_name, $path);
if (!file_exists($style_path)) {
$style_path = image_style_url($style_name, $path);
}
$variables['path'] = file_create_url($style_path);
$variables['getsize'] = FALSE;
return theme('image', $variables);
}
?>