Resize picture-element

Hi,
I have configured a new card with a picture-element as a panel to serve as my floor-plan.
The issue is that home assistant always force the width of the picture to have all of the possible space. This means that if I put my tablet in horizontal mode the picture gets cut off.
Is it possible to force home assistant to always keep all of the picture in the screen?

thanks!

Not without wasting space in portrait mode.

I don’t mind wasting some space on portrait mode…

Ok then. You have to add transparent space on either side of your exiting image. You can do this with a half decent PNG editor like (free) paintdotnet’s “canvas size” option.

You are going to have to reposition all your elements.