Convert all jpg pngs to webp
tsolong opened this issue · 1 comments
tsolong commented
Because the previous image resource files for the project were in formats such as jpg png, I now want to convert all resources into webp and output them to dist during the construction process, but I don't want to add the?as=webp
identifier on the img URL in the source code. Is there a good solution?
alexander-akait commented
You can use this - https://github.com/webpack-contrib/image-minimizer-webpack-plugin?tab=readme-ov-file#loader-generator-example-for-imagemin
feel free to feedback