You are here

function theme_image_display in Image 6

Same name and namespace in other branches
  1. 5.2 image.module \theme_image_display()
  2. 5 image.module \theme_image_display()

Theme an img tag for displaying the image.

1 theme call to theme_image_display()
image_display in ./image.module
Create an <img> tag for an image.

File

./image.module, line 702

Code

function theme_image_display($node, $label, $url, $attributes) {
  $title = isset($attributes['title']) ? $attributes['title'] : $node->title;
  $alt = isset($attributes['alt']) ? $attributes['alt'] : $node->title;

  // Remove alt and title from $attributes, otherwise they get added to the img tag twice.
  unset($attributes['title']);
  unset($attributes['alt']);
  return theme('image', $url, $alt, $title, $attributes, FALSE);
}