Closed henrykuijpers closed 7 years ago
A web rendition is only used to determine the crop rectangle, if one was defined, or if the requested width corresponds to an already DAM-processed web rendition. Otherwise we always use the original asset to process the image.
The DAM workflow that provides web renditions is configurable, so that a user can provide whatever width they require. I really don't see a need here to always process the original assert, since sometimes this can be a very CPU-intensive process.
@raducotescu, that means cropping of images wider 1280px (web rendition) is broken when default workflows are active, right? That is at least what I've seen so far.
Why would the cropping be broken?
The values (coordinates, width and height) for cropping are calculated based on web rendition and written to imageCrop
. When original rendition is used in publish (and it's wider than 1280px) these values are not functional of course. A (much) smaller area of the image is rendered. Or is there any setting I'm missing? Can you try with a large image (e.g. QFHD 3840x2160) yourself?
https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components/blob/da012e690e33d33051df268233eb92f5d0e11423/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/servlets/AdaptiveImageServlet.java
This servlet uses the web rendition (usually 1280x1280) as the source for the resized image.
This is not correct, as it can happen that we need an image wider than 1280px. This was also a very annoying problem with the ootb adaptive image component in foundation.
Solution: Use the original image
The original image can be very large in size though. A consideration could be to use the original only if an image with a width larger than 1280 is requested. However, you will notice the quality of the 1280 image requested through this servlet is a lot worse than the 1281 image.