Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Onsite AEM DAM Image Rendition Incorrect Orientation

Avatar

Level 4

Hey There,

 

I have a question related to image orientation. 

A user pointed to a batch of images they recently uploaded, that after ingesting to the AEM DAM they got a wrong rotation in renditions as well as thumbnail in Card View. The main image is oriented correctly. A few renditions rotated the image CCW 90 dgs. Why is that? How can this be fixed? 

Most of the images in the DAM are oriented correctly. The workflow is the same to all and has had no changes. Please see an example below. The pattern is the same throughout.

 

Many thanks! 

 

Screenshot 2025-05-08 at 2.01.23 PM.png

 

3 Replies

Avatar

Community Advisor

Hi @PovEim,

When images are uploaded to AEM DAM and you notice that some renditions or thumbnails are rotated incorrectly (e.g., 90° counterclockwise) even though the main/original image appears correctly this is caused by:

Avatar

Community Advisor

Hi @PovEim,

I think, this is a known issue related to how AEM processes image orientation metadata - specifically the EXIF orientation tag embedded in JPEG images taken with cameras or smartphones.

Why this happens:

  • Images captured by cameras often store the orientation in an EXIF tag instead of physically rotating the pixel data.

  • When you upload such an image to AEM DAM:

    • The original binary remains correct because viewers read the EXIF tag to auto-rotate.

    • AEM’s DAM Update Asset workflow (specifically the DAM Rendition Step) uses ImageMagick or Java ImageIO to generate renditions and thumbnails.

    • Some image processing libraries ignore the EXIF orientation tag and just render the raw pixels — resulting in rotated renditions and thumbnails.

Here is how you can try to fix it:

1. Enable Auto-Orient in Image Processing

If using ImageMagick (which AEMaaCS may be configured to use internally):

  • Ensure the command includes the -auto-orient flag.

  • In custom workflows or external rendition tools, apply auto-orientation during processing.

2. Use ACS AEM Commons' “Image Orientation Corrector”
  • ACS AEM Commons provides a process step called “Image Orientation Corrector”.

  • Add this step before the DAM Update Asset step in your workflow.

  • It reads the EXIF orientation and physically rotates the image, removing the tag afterward — ensuring correct orientation for all renditions and thumbnails.

3. Reprocess Existing Assets
  • For already affected images, re-run the modified DAM Update Asset workflow after fixing the orientation.

  • You can use the “Reprocess Asset” option or write a script to batch process them.

Hope that helps!


Santosh Sai

AEM BlogsLinkedIn


Avatar

Level 4

Thank you @SantoshSai and @AmitVishwakarma for your answers and solutions! I will ask for help from our devs team re auto-orient.

 

Also just sharing my workaround in this situation:

- I too figured the issue re phone rotation and exif data

- It can be confirmed if a problematic image is saved on Mac. One needs to open it with Preview app. Then go Tools > Show Inspector (or CMD + I)

- Then in Info tab check Orientation. If the image is displayed correctly, but orientation does not say 1 Normal, then there will be an issue with the AEM. 

- Quick fix - open image in Photoshop and save it. Make no changes, just Save image. This changes Exif orientation to 1 Normal. 

- Re-upload the image to the DAM. 

 

Thanks