- drupal
- 7
| Versions | |
| 7 |
theme_image_style($variables) |
Returns HTML for an image using a specific image style.
Parameters
$variables
An associative array containing:
- style_name: The name of the style to be used to alter the original image.
- path: The path of the image file relative to the Drupal files directory.
This function does not work with images outside the files directory nor
with remotely hosted images.
- alt: The alternative text for text-based browsers.
- title: The title text is displayed when the image is hovered in some
popular browsers.
- attributes: Associative array of attributes to be placed in the img tag.
Related topics
- Default theme implementations
- Functions and templates for the user interface to be implemented by themes.
Code
drupal/modules/image/image.module, line 1096
<?php
function theme_image_style($variables) {
$variables['path'] = image_style_url($variables['style_name'], $variables['path']);
return theme('image', $variables);
}
?>