You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for creating this plugin! I've got an request to improve the handling of webp images. I'm using webp images in combination with a rewrite in htaccess. To make this work the webp extension needs to be appended to the original file name, including the original extension. Can you add an option for this?
Hey, I already looked into this before, but couldn't find a way to get it to work. The plugin that we use (image-minimizer-webpack-plugin) doesn't seem to offer any such options and there are no examples for this use case. I could not find a way to access the original asset file extension under the generator.filename option. But I am open to pull requests if anyone with more knowledge about webpack can figure it out :)
In any case, you can accomplish the same thing in your HTML with a picture element. Here's a blade partial that I use:
Thanks for your reply and the context. My knowledge of webpack isn't that extensive either I'm afraid. I am aware of the picture option, this is indeed a good option for static files. I will look into that for now.
Hi,
Thanks for creating this plugin! I've got an request to improve the handling of webp images. I'm using webp images in combination with a rewrite in htaccess. To make this work the webp extension needs to be appended to the original file name, including the original extension. Can you add an option for this?
I found this solution in another plugin: https://github.com/iampava/imagemin-webp-webpack-plugin#overrideextension, which might work great!
Thanks,
Jorn
The text was updated successfully, but these errors were encountered: