I’m working with a graphic ador that pulls JPG images into InDesign. Each image includes a flag indicating whether it's portrait or landscape, and everything appears correctly oriented while working in InDesign.
However, when I output the final file (e.g., to PDF), some images are rotating unexpectedly—even though they appear correct within the InDesign layout.
Has anyone encountered this issue before? Could this be related to image metadata (even though it is also the correct orientation) or a setting in the export process?
Any help or guidance would be greatly appreciated.

Thanks for the quick response. We are working with VM Server 2022, InDesign version 19.4, Ucreate version 13.2.1 and Uproduce 13.2.1 on Server 2019. Unfortunately, I was unable to open your file because we working in an older version. By the sounds of your description my application is setup similar to yours, with the layers and content objects. The photos are supplied by the customer, portrait and landscape in JPG format. The image displays with the correct orientation in the graphic frame during preview, but rotates unexpectedly within the frame upon output. A comparison of the EXIF metadata between the correctly oriented and misoriented images shows no significant differences; the data appears to be identical. I was able to open the photo in photoshop and simply re-save it and then it was corrected. We are looking into creating a script to preflight the meta data of the photos before output. Thanks again for your assistance.