Feature #54672
Hook in ImageResizer before reindexing
100%
Description
It would be awesome to have an hook in the ImageResizer
class right before the line
\Causal\ImageAutoresize\Utility\FAL::indexFile
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 about 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.
Updated by Xavier Perseguers almost 7 years ago
- Status changed from Needs Feedback to Accepted
- Assignee set to Xavier Perseguers
- Target version set to 1.5.0
Updated by Gerrit Code Review almost 7 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project TYPO3CMS/Extensions/image_autoresize has been pushed to the review server.
It is available at https://review.typo3.org/28033
Updated by Xavier Perseguers almost 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c40b098d378adb7cc2a21a8a1facc29c3f369252.