F
Filament9mo ago
AiAe

Uploading image save width and height

Is it possible to get and save in table the uploaded image width and height
3 Replies
awcodes
awcodes9mo ago
Yes, but you’ll have to override the ->saveUploadedFileUsing(). I’d recommend looking at the BaseFileUpload class to see what all is happening there before trying to override it though. The Curator plugin does this. Could maybe look there too.
AiAe
AiAe9mo ago
Thanks, will check it out. but wont something like "afterStateUpdated" work as well or similar event, since i assume that triggers only if u edit the image later on
awcodes
awcodes9mo ago
Could probably do it there. But I’d recommend doing any image / file manipulation on save so it doesn’t slow down the form rerendering.