ctessier / nova-advanced-image-field

🌄 📐 A Laravel Nova advanced image field with cropping and resizing using Vue Advanced Cropper and Intervention Image
https://novapackages.com/packages/ctessier/nova-advanced-image-field
MIT License
101 stars 26 forks source link

Multiple sizes #59

Open notfalsedev opened 3 years ago

notfalsedev commented 3 years ago

First things first, thanks for creating this Nova package!

Is it possible to create multiple sizes from one image upload? I need two different sizes of the same image.

Thanks!

keironwaites commented 3 years ago

I'm interested in this as well.

lvidal1 commented 3 years ago

Is there any update on this?

ctessier commented 2 years ago

Hi @notfalsedev !

Sorry for the (very) late response 😨😆 Did you guys try the store method on the Image field that Nova provides? Check it out here: https://nova.laravel.com/docs/3.0/resources/file-fields.html#customizing-the-entire-storage-process

If this is not enough, I guess making the AdvancedImage able to store multiple files would be possible, but it would require some reflection to do it properly (using an array or sizes, or being able to hook some function to do extra work, etc.). Did you maybe already think about it? Feel free to open a pull request. Otherwise, I will take a look whenever I have time.

Thank you!