Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

imagecache_external

4,501 sites Security covered
View on drupal.org

About

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

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 (for Drupal 8)

Render array

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

Twig extension (from 3.0.1)

{{ 'https://my.web.site/my-image.jpg'|imagecache_external('thumbnail') }}

Theme function

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

For Drupal 7 the instructions are the same, except you need to use the path instead of the uri parameter.

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.
  • Files can optionally be stored in subdirectories since 3.0.1
  • You may flush the fetched external images (note that this does not flush the generated imagecache files before 3.0.1) by visiting admin/config/media/imagecache_external/flush

Credits

Activity

Total releases
4
First release
Jun 2025
Latest release
3 months ago
Release cadence
74 days
Stability
100% stable

Release Timeline

Releases

Version Type Release date
3.0.8 Stable Jan 12, 2026
3.0.7 Stable Nov 25, 2025
3.0.6 Stable Nov 24, 2025
3.0.5 Stable Jun 3, 2025