You are here

function image_display in Image 5

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

Create an <img> tag for an image.

15 calls to image_display()
image_attach_block in contrib/image_attach/image_attach.module
Implementation of hook_block().
image_attach_form_alter in contrib/image_attach/image_attach.module
implementation of hook_form_alter()
image_attach_views_handler_field_iid in contrib/image_attach/image_attach.module
Views handler for displaying the image.
image_attach_views_handler_field_iid_link_image in contrib/image_attach/image_attach.module
Views handler for displaying the image in a link to the attached image.
image_attach_views_handler_field_iid_link_node in contrib/image_attach/image_attach.module
Views handler for displaying the image in a link to the image node that attaches the image.

... See full list

File

./image.module, line 746

Code

function image_display(&$node, $label = IMAGE_PREVIEW, $attributes = array()) {
  if (empty($node->images[$label])) {
    return;
  }
  $image_info = image_get_info(file_create_path($node->images[$label]));
  $attributes['class'] = "image image-{$label} " . (isset($attributes['class']) ? $attributes['class'] : "");
  $attributes['width'] = $image_info['width'];
  $attributes['height'] = $image_info['height'];
  return theme('image_display', $node, $label, file_create_url($node->images[$label]), $attributes);
}