Hook in ImageResizer before reindexing
It would be awesome to have an hook in the
ImageResizer class right before the line
Reason is that this would be a perfect step to have additional options for changing images. I am thinking of using your extension as basis for optimizing images further by using 3rd party libraries and not something like the gifbuilder.
what you think?
Updated by Xavier Perseguers over 7 years ago
- Subject changed from Hook in ImageResizer before redindexing to Hook in ImageResizer before reindexing
- Status changed from New to Needs Feedback
Instead of a hook I'd prefer a signal as this is what we tend to do in new code.
Could you please elaborate a bit more? If you plan to better optimize the image using 3rd party libraries, I'd say that having a "hook" right before the call to FAL::indexFile is "too late" as the original file has already been deleted.
It depends on what you plan to do, if you want to completely override the processing with gifbuilder (having a real use case will help), I would think of either abstracting the call to
$gifCreator->imageMagickConvert and let you use your own implementation of this call or "hook" by processing the original file and "stop" the standard resize to take place, then index file as usual.