Hello everyone, 

I know about image variations and cropping in Magnolia. Sometimes this is not 
enough. We need entirely different images for the viewports, for example if 
there is text in the images which has to have a different size for each 
viewport to be readable. To implement this I see the following possibilities:

1. Adding 4 different LinkFieldDefinitions to each Component (we have a lot). 
This clutters the dialogs, especially when using the DamFilePreviewComponent. 
Also we'd have to make a lot of code changes.

2. I added a second resources to the dam-app 
/modules/dam-app/apps/assets/subApps/detail/editor/form/tabs/asset/fields/ with 
a different binaryNodeName. This works so far but is not supported by the 
DamTemplatingFunctions, which is why I used the ImagingTemplatingFunctions. (We 
will use thumbor.org for creating variations so we don't really need any of the 
DamTemplatingFunctions).

Example: 
[code][#assign contentNode = 
cmsfn.contentById("5898e2a1-7297-49ea-adc3-e5e323242dd2","dam")]
[#assign binaryNode = cmsfn.asJCRNode(contentNode).getNode('jcr:content')]
[#assign imgLinkOriginal = 
imgfn.getImageVariationLinkFromBinary(binaryNode,'original')!][/code]
What I don't like about this is the way the URLs are looking:
[code]/.imaging/default/dam/Startseite/2017_KW14/Herostage_text_1260x400.jpg/jcr%3acontent.jpg[/code]
the binaryNodeName.
A big pro of this approach is that there is no need to adjust any dialogues. I 
was also thinking about maybe overwriting the DamTemplatingFunctions for my 
needs.

3. One could write a custom editor, to edit the different variations?

How do you implement responsive images? Do you know a nice way to integrate 
different images in a compact magnolia dialog?

Thanks
Marc

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=ae7f3f55-c3ae-413c-ad7f-ac0c1386c349


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to