Open peterjaap opened 3 years ago
@peterjaap just did a try with setting the default Magento value for "Base URL for User Media Files" to the URL of Imgix and that shows the correct image, without any other settings. It only requires the Imgix specific parameters like fit
, fill-color
, compress
, etc. That could be done within this module to send that along as parameters to Imgix.
Ah I see that Imgix supports both the w=..
as well as width=..
so you don't even need to rewrite the parameters in that case :)
But yeah if you want extra parameters or secure the URL, you could just use the Plugin afterGetUrl()
And besides the benefit of not having to generate resized images on the server, it will also use the original image as base instead of the cached images. So only 1 image will count to as 'Master Image' per product image, instead of all different sizes counting as different master images.
We just did a 'temporary' update that automatically gets the right image size for now https://github.com/elgentos/magento2-imgix/releases/tag/2.0
We will look into implementing the above way for the next release!
Opmerkingen van Barry;