Responsive images getting rotated

System Information
  • Strapi Version: 4.5.3
  • Operating System: Ubuntu 22.04.1
  • Database: better-sqlite3
  • Node Version: 18.12.1
  • NPM Version: N/A
  • Yarn Version: 3.3.0

I have responsive friendly upload, size optimization, and auto orientation all enabled. Some of the photos I upload end up with all of their generated responsive friendly images rotated sideways. Before enabling the auto orientation flag, the original images were also ending up rotated sideways, but that flag fixed those, so at least they aren’t sideways too. This seems to affect images that have a larger height than width.

How do I get these generated images to match the rotation of the original? Is it possible that the auto orientation is happening after the different sized photos are generated?