Image orientation

Hello Everyone,

I am building a Twitter clone for educational purpose.
My app is 99% ready, but I’m facing an issue I can’t solve without needing advanced skills.

My users can publish pictures, if the picture’s orientation is landscape, I want the feed to display it with a 4:3 ratio, but if the orientation is portrait, I want my feed to display it with a 2:3 ratio ALIGNED LEFT.
Do we have a native way to do it?

What I’ve tried :

  • Image run mode rendering Rescale , It works but the image element is way wider than the image itself in portrait mode, and the image is centered which is weird as my text is left aligned
  • Setting up a Plugin in order to get the image ratio, and then dynamically displaying a portrait, or a lanscape image but it’s to difficult for my students to understand.

Any help will be really appreciated,
Robin