staempfli / magento2-module-image-resizer

Magento 2 Module to add simple image resizing capabilities in all blocks and .phtml templates
92 stars 32 forks source link

initRelativeFilenameFromUrl doesn't take into account cdn url #4

Closed gtlt closed 7 years ago

gtlt commented 7 years ago

Resizer doesn't work if you have a media url different from your imageUrl. Example : base site : www.example.com => base of the imageUrl media url : cdn.example.com => strpos fails

fix => use the parse_url function

gtlt commented 7 years ago

I made a pull request : https://github.com/staempfli/magento2-module-image-resizer/pull/5

jalogut commented 7 years ago

Hi @gtlt

Thanks for your contribution. I merged the PR and added a small change in your code. You can find these changes on version 1.1