Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Imagecache External

Security covered Maintenance fixes only 4,679 sites

This module allows you to store external images on your server and apply Drupal's image styles to them. It provides ways to integrate this functionality into your Drupal site using render arrays, Twig extensions, theme functions, or through node fields.

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

Drupal 10–11

Ask your assistant about Imagecache External

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • image Drupal core

Required by

3 tracked projects depend on this one

Activity

Tracked releases
8
Tracked since
Mar 2024
Latest release
5 months ago
Releases (12 mo)
4 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
3.0.9 Stable 10–11 May 10, 2026
3.0.8 Stable 10–11 Jan 12, 2026
3.0.7 Stable 10–11 Nov 25, 2025
3.0.6 Stable 10–11 Nov 24, 2025
3.0.5 Stable 10–11 Jun 3, 2025
3.0.4 Stable 10–11 Aug 3, 2024
3.0.3 Stable 9–10 Mar 31, 2024
3.0.2 Stable 9–10 Mar 1, 2024