Closed sturmundbraem closed 1 week ago
No because the whole purpose is to gain space on the disk. But such a backup may certainly be implemented by hooking into the upload process similarly to this extension. Possibly I'd fine sending a signal/notification when a file is about to get resized, so that you may implement it and do some backup, but I don't want to implement a backup natively.
No because the whole purpose is to gain space on the disk
We've had this thought as well.
But for us, the whole purpose is more than just disk space (and why this extension is so important): to prevent server collapses when an image gallery or similar is being rendered and fluid has to resize a gazillion 25mb Photos to 20 srcsets and crop variants each.
I double checked, there's already a PSR-14 in place that you can easily listen on, namely \Causal\ImageAutoresize\Event\ImageResizedEvent
. It's invoked after a resize (and/or conversion) has been done and before the original file is replaced by the reprocessed version. That event gives you access to the original file with path and the new one.
So you should listen to it in your own (site) extension to do the backup the way you want. Easy!
Thank you!
What do you think about moving the uploaded images into a backup folder before resizing and maintaining them there? re #112