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

does not support theme images #18

Closed fritzmg closed 6 years ago

fritzmg commented 6 years ago

This module assumes, that the images reside in /pub/media. But what about images from /pub/static? E.g. any images from themes. Is this module not supposed to support those files as well?

jalogut commented 6 years ago

Hi, no this module is not supposed to support /pub/static. This module was created to resize media files that are managed from magento admin. Static files on the other hand are managed by developers, so developers should already use right sizes in there. Or am I missing something here?

fritzmg commented 6 years ago

Well in our case we are using images from the theme which are displayed at different sizes on various places - so it was more convenient to resize one large image dynamically, instead of providing a lot of different versions for the same image (think also srcsets). But I understand if this is out of scope for this module.

jalogut commented 6 years ago

Hello, well in that case, you can add this feature. It should not be difficult to implement. Just add an extra path to check for the images. Let me know if you need help 😉

fritzmg commented 6 years ago

I ended up doing something else - but if the need for a resizer resurfaces for theme images I'll come back to it and may be provide a PR :)