You are here

function theme_imagecache_external in Imagecache External 7.2

Same name and namespace in other branches
  1. 7 imagecache_external.module \theme_imagecache_external()

Returns HTML for an image using a specific image style.

Parameters

array $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.
1 theme call to theme_imagecache_external()
ImagecacheExternalTestCase::testCachingExternalImage in ./imagecache_external.test
Test caching an external image.

File

./imagecache_external.module, line 252
Allows the usage of Image Styles on external images.

Code

function theme_imagecache_external($variables) {
  if ($variables['path'] = imagecache_external_generate_path($variables['path'])) {
    return theme('image_style', $variables);
  }
  return FALSE;
}