Enonic version: 7.2.0
OS: Ubuntu 18.04
I was looking here HtmlLinkProcessor.java to understand how it’s working, but it seems it’s pretty strange that it’s allowing me just to specify aspect ratio and nothing else.
For example: image://6c8e936c-927e-460d-afb9-7bc44d5982ab?scale=4:1
Check it out:
<figure class="captioned editor-align-right" style="float: right;"><a class="fancy" href="media://download/6c8e936c-927e-460d-afb9-7bc44d5982ab" title="Fiskeridirektør Liv Holmefjord med Bryggen i Bergen i bakgrunnen. Foto: © Anette Aase / Fiskeridirektoratet"><img alt="liv-holmefjord-bryggen.jpg.jpg" data-src="image://6c8e936c-927e-460d-afb9-7bc44d5982ab?scale=4:1" src="/admin/rest/cms/default/base/content/image/6c8e936c-927e-460d-afb9-7bc44d5982ab?ts=1602113421748&size=768&scaleWidth=true&scale=4:1" /></a> <figcaption></figcaption> </figure>
If I have a HTML code like that I can resize the resulting image on backend. But I wasn’t able to specify any other scaling method, like width(300), height(100) or max(500), etc.
When I try anything else than aspect ratio, I get this on content studio:
Let me ask: Was that a bug or just a missing feature?
[EDIT]
Another thing I just found is that all images (even images smaller than 768 of width) gets resized using the scaling width(768) when rendered from image links. I just wonder: Why ?
To solve that I have to put ?keepSize=true on all image links, like this example:
image://6c8e936c-927e-460d-afb9-7bc44d5982ab?keepSize=true