staempfli / magento2-module-image-resizer

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

Directory separator incorrectly used for URL in getResizedImageUrl() #14

Closed clivewalkden closed 6 years ago

clivewalkden commented 6 years ago

Hi,

On Windows machines the use of the directory separator in getRelativePathResizedImage() which is called within getResizedImageUrl causes issues as URL's are generated in the following format.

http://domain.com/media/staempfli_imageresizer\cache\wysiwyg\638x372_co_ar_tr_85\filename.jpg

Suggest changing DIRECTORY_SEPARATOR to just use '/' for full OS support.

Shall I do a PR for this?

jalogut commented 6 years ago

Hi @clivewalkden,

Yes, a PR would be appreciated. Thanks

clivewalkden commented 6 years ago

Tested on my Windows machine and URL is now correctly output

jalogut commented 6 years ago

Fixed on version 2.0.2