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


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

Usage is simplified in Drupal 7 as follows:

Theme function

print theme('imagecache_external', array(
'path' => 'https://drupal.org/files/druplicon.large_.png',
'style_name'=> 'thumbnail',
'alt' => 'Druplicon',

Render array

return array(
'#theme' => 'imagecache_external',
'#path' => 'https://drupal.org/files/druplicon.large_.png',
'#style_name' => 'thumbnail',
'#alt' => 'Druplicon',

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

Other notes

  • Images are fetched using drupal_http_request so if your server is not configured properly (view the status report) this won't work.
  • 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/settings/imagecache_externals/flush.


Project Information