[MGNLIMG-206] Support configurable ImageStreamer Created: 18/Dec/17  Updated: 26/Aug/22

Status: Open
Project: Imaging
Component/s: image operations
Affects Version/s: 3.4
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Viet Nguyen Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: Imaging performance

 Description   

Based on SUPPORT-8159 and detail investigation, currently we didn't have any easy way to provide a custom or direct ImageStreamer, DefaultImageStreamer is hard-coded in info.magnolia.imaging.Imaging.getStreamer(ParameterProviderFactory<E, PT>) and not configurable.
Also DefaultImageStreamer is using Sun provided ImageWriter (and some from twelvemonkeys imageio jpeg) which sometimes didn't satisfy highly demanded customers and it also alter already processed image if we use custom image generator.
Moreover BufferedImage is not a preferred one when customers are using 3rd party library because BufferedImage is a derived value after Magnolia decoded the uploaded image, lost some metadata(s) and used our image decoder which is also not a preferable one. Binary store to and from JCR with BufferedImage in cache would be better.



 Comments   
Comment by Andrew Elia [ 10/May/21 ]

We've observed that on sites using heavier images, optimisations made to the source image in the DAM (eg. pngquant or guetzli) end up being lost once variations are generated. To mitigate this, we've investigated building a subclass of DefaultImageStreamer which can be used to intercept the image before it gets recorded and apply optimisations at that point. However it appears that this is currently infeasible with the existing architecture so it would be really useful (and powerful) if this could be achieved.

Generated at Mon Feb 12 02:13:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.