Closed JeromeDeBoysere closed 2 years ago
Have you tried running npm run prod
? Images are only optimized in production mode.
Have you tried running
npm run prod
? Images are only optimized in production mode.
Awww yes! It does work!
I thought I had to use if (mix.inProduction()) { ... } for that.
Thanks!!
Hello there,
I have just discovered your repo, but I can make it work at 100% on my project. I think I miss something but I dont know what.
In my webpack.mix.js, I have:
The images are copied from /resources/assets/images to /public/assets/images so no problem with this. But, they have the same weight so I guess the images in /public/assets/images are not optimised/compressed after a npm run dev.
Any idea why?
Thank you for your help