[MTE-41] Add component ThemeDelegatingImagingSupport that will delegate to theme's imaging support replacing the DefaultImagingSupport Created: 18/Aug/15  Updated: 26/Aug/15  Resolved: 18/Aug/15

Status: Closed
Project: Magnolia Templating Essentials
Component/s: imaging
Affects Version/s: None
Fix Version/s: 0.6

Type: Improvement Priority: Neutral
Reporter: Philip Mundt Assignee: Philip Mundt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1.5h
Original Estimate: Not Specified

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)
Sprint: Sprint 7 (Basel)
Story Points: 1

 Description   

When using the mte-imaging module, the system-wide component for ImagingSupport is still the DefaultImagingSupport, which is injected in different other classes. Especially the info.magnolia.imaging.functions.ImagingTemplatingFunctions use the ImagingSupport, resulting in the following behavior:

Even when a theme + imaging support and variations are configured will the DefaultImagingSupport be used always returning the original image instead of variations of it (when calling info.magnolia.imaging.functions.ImagingTemplatingFunctions#getImageVariationLinkFromBinary(javax.jcr.Node, java.lang.String)).

Solution

Provide a ThemeDelegatingImagingSupport that delegates to the theme's imaging support and falls back to the DefaultImagingSupport when no theme can be found.


Generated at Mon Feb 12 07:40:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.