Imagecache External

Component ID

975222

Component name

Imagecache External

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

168204

Component created

Component changed

Component body

About

Imagecache External is a utility module that allows you to store external images on your server and apply your own Image Styles (D7).

Configuration

Important: to use the module you need to visit admin/config/media/imagecache_external and either:

  • Add some domains to the whitelist -or-
  • De-activate whitelist functionality

Usage instructions

Render array

<?php
  return array(
    '#theme' => 'imagecache_external',
    '#path' => 'https://www.drupal.org/files/druplicon.png',
    '#style_name' => 'thumbnail',
    '#alt' => 'Druplicon',
  );
?>

Theme function

<?php
  print theme('imagecache_external', array(
    'path' => 'https://www.drupal.org/files/druplicon.png',
    'style_name'=> 'thumbnail',
    'alt' => 'Druplicon',
)); 
?>

You can also use external images without coding at all by adding a Text or Link field to a Node Type and then use the Imagecache External Image formatter.

Other notes

  • Images are stored in the site's files folder in an external subdirectory.
  • You may flush the fetched external images (note that this does not flush the generated imagecache files) by visiting admin/config/media/imagecache_external/flush

Credits