We want to use HTML picture tag to display DAM renditions.
Below backend code of the component:
Below generated html:
This was possible by remove in `media/src/main/java/io/wcm/handler/media/impl/MediaBuilderImpl.java`
If we add ratio to the builder the connection to DAM will be lost and every rendition will be generated on the fly and pointed under /content/... path, what is not expected from Caching Strategy point of view - if image in DAM will be changed then instead of invalidating one path in DAM we need to invalidate many under /content.
Could you add some way to skip ratio validation? Or we should implement our requirements differently?
which version of the media handler are you using? in the very latest version (1.5.0) we implement several improvements around media formats without having a fixed ratio.
We are using exactly 1.5.0.
Apologize, it was not available to set in the ticket select box.
ok, i understand.
revisiting the code it think with the improvements from release 1.5.0 there is no longer any need to allow only media formats with a ratio for picture sources - i've removed this check in version 1.5.1-SNAPSHOT
does this solve your issue?
btw, for your simple usecase having the same media format for all breakpoints consider using "imageSizes" instead for "pictureSource" for the repsonsive image handling.
Thank you, this should solve my issue. The example code is just simply starting point, I think it will be more and more requirements soon.