Image Cache External Drupal Module

Image Cache External Drupal Module

Found this module when I wanted to be able to use and external image, in my case was a Youtube video thumbnail, and be able to apply an image style and save it to the files directory. This can then save the image to the website's files directory and does the resizing as well. A great alternative to linking to a third party site and relying on the image being available on that site.

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

This works for both Drupal 7 and Drupal 8. For Drupal 8 the usage example on the site are slightly incorrect. Replace #path with #uri in order for it work. Also be sure to use the Dev version for Drupal 8 since the 1.0 version had many errors that were fixed in the dev version.

Wrong version:

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

Correct version:

return array(
'#theme' => 'imagecache_external',
'#uri' => 'https://www.drupal.org/files/druplicon.png',
'#style_name' => 'thumbnail',
'#alt' => 'Druplicon',
);
Content type template suggestions

Content type template suggestions

Drupal 8 SEO Modules

Drupal 8 SEO Modules