Enables Drupal core to generate image styles for remotely hosted images in the image field.
Features
Drupal core allows storing records about remote URLs (e.g., https://...) alongside records about uploaded files in file entities. However, it cannot generate image derivatives (styles) for remote images. This small module addresses that limitation by hooking into the style generation process, downloading a remote image, and temporarily storing it in the site's local filesystem, so derivatives can be generated as usual.
Note: Currently, there is no field widget to set the URL of a remote image in the UI (#3491022: Provide field widget to set remote image URL). However, it is possible to do this programmatically (e.g., during imports, migrations, etc.) by creating a file entity with a remote URI (https://...) and assigning it to the entity's image field.
Note: Currently, the module does not work with the responsive image formatter (#3491019: Support responsive image styles).
Important: Plain http is not supported due to potential security risks. Only https is supported.
Similar projects
The following modules (listed alphabetically) also allow generating image styles for remote images. Since they function differently from this module, they come with their own unique features. Please review their documentation to determine the best fit for your project.
-
Imagecache External
A utility module that allows you to store external images on your server and apply your own Image Styles.
Currently, this module does not work with the default image field type and formatter.
-
Remote Stream Wrapper
Provides the ability to use external files with file fields without saving the files to your local files directory.
This module registers a stream wrapper for remote protocols (
http/https). This means that any file or stream function called with a remote URI argument goes through it instead of using native PHP or platform libraries. For the sole purpose of generating image styles, this approach might be overkill.
🇺🇦 |
This module is maintained by a Ukrainian developer. Please consider supporting Ukraine in a fight for its freedom and safety of Europe. |
Project information
- Project categories: Media
- Ecosystem: Drupal core
- Created by pingwin4eg on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
