You are here

function theme_imagecache_imagelink in ImageCache 6.2

Create a link the original image that wraps the derivative image.

Parameters

$presetname: String with the name of the preset used to generate the derivative image.

$path: String path to the original image you wish to create a derivative image tag for.

$alt: Optional string with alternate text for the img element.

$title: Optional string with title for the img element.

attributes: Optional drupal_attributes() array for the link.

Return value

An HTML string.

File

./imagecache.module, line 922
Dynamic image resizer and image cacher.

Code

function theme_imagecache_imagelink($presetname, $path, $alt = '', $title = '', $attributes = NULL) {
  $image = theme('imagecache', $presetname, $path, $alt, $title);
  $original_image_url = file_create_url($path);
  return l($image, $original_image_url, array(
    'absolute' => FALSE,
    'html' => TRUE,
    'attributes' => $attributes,
  ));
}