adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
733 stars 739 forks source link

[Image] Adaptive image with quality + width selector does not maintain aspect ratio #1237

Closed ky940819 closed 3 years ago

ky940819 commented 3 years ago

Bug Report

Current Behavior In version 2.12.0 the adaptive image servlet changes the aspect ratio of images to make them square when served with a quality+width selector. This causes the images to be severely distorted.

Expected behavior/code It should not do this. The image aspect ratio should always be maintained (assuming no crop, or other transformations are applied).

Environment

Additional context / Screenshots Steps to reproduce:

  1. Go to /content/core-components-examples/library/page-authoring/image.html
  2. Open the template editor for this page
  3. On the template, edit the "Image" component policy
  4. Add image quality (e.g. 82) and width selectors (e.g. 100, 1200).
  5. Save the image policy component
  6. Return to /content/core-components-examples/library/page-authoring/image.html
  7. See that the images are now square and distorted.

See attached screenshot, where the left is the image prior to adding quality+width selectors, the right is the image after adding these policy settings. Screenshot from 2020-11-03 13-22-32

msagolj commented 3 years ago

Works as intended in 2.11.1.