CupOfTea696 / laravel-mix-imagemin

Laravel Mix imagemin plugin
MIT License
19 stars 14 forks source link

Can't get it copying to the right directory #7

Open matthewlukedesign opened 4 years ago

matthewlukedesign commented 4 years ago

Great extension but I can't for the life of me seem to control where the minified files end up. Context seems to set my dev directory well, but using 'to' as an option seems to have no effect. Not sure if it's picking up a global public path somewhere? Any help would be appreciated

danmichaelo commented 4 years ago

I found this confusing too. To copy/minify files from ./resources/images/* to ./public/images/ I ended up with this:

mix.imagemin({
  from: 'images/*',
}, {
  context: 'resources',
})

There's some more examples in #1