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
- larowlan started the project
- manu manu contributed the D7 port
- toddmbloom contributed the D8 port
- BarisW maintained the D8/D9 version
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Content Editing Experience, Import and Export, Media
- 6,801 sites report using this module
- Created by larowlan on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 3.0.x-dev updated 31 Mar 2024 at 15:53 UTC
Development version: 7.x-2.x-dev updated 24 Sep 2019 at 06:28 UTC