image
image copied to clipboard
Couldn't find a way to provide custom headers for Image::make()
We have encountered some cases where Image::make() doesn't work if passed an image URL as a parameter. The URL requires some specific headers along with the request in order to make connection but using Intervention library, we couldn't find any way to provide additional/custom headers.
Digging deep into the library, I can see in Intervention/Image/AbstractDecoder.php
method initFromUrl()
has predefined set of headers but these should be extendable.
EDIT: You can try "https://www.dhl.com/content/dam/General%20DHL%20pictures/IARefresh/Homepage/Rotator/automotive_203x125.jpg"
Made a Code Relay task for this: https://github.com/code-relay-io/image/blob/master/README.md . We will work on it!
Running into the same issue. Need to be able to provide headers for connection purposes. This is helpful for working with various cloud networking set ups.
The integration of the option to read data directly via URLs was a mistake. The task of this library is image manipulation. Reading data via HTTP should be done by a corresponding client. For this reason, Intervention Image Version 3 does not support reading URLs.