Why is my state_image resized in the picture elements panel?

Dear Forum,

I am new to home assistant yet even after searching through all the forums I couldn’t get to a solution that is addressing my need.

As you can see in the screenshot, my state image is shown small in comparison to the picture elements background even though both images have the same pixel size.

The source code for the image is as follows:


- type: image
    entity: light.essbereich
    tap_action: none
    hold_action: none
    state_image:
      'on': /local/floorplan/Eberle4K_hell.png
      'off': /local/floorplan/Pixel.png
    style:
      top: 50%
      left: 50%

I am pretty sure this should be an easy one for the pros here :smiley:

Thanks heaps and great to be in this community.

Cheers,
Daniel

I’m having the same issue.
We’re you able to find a solution for this?
In my case, i’m trying to show an image of a certain size when a switch is on and show a 1px transparent image when it’s off.
the only problem is, that i need to enter a width or height for the picture to display correctly, which then also applied to the 1px transparent image, which i don’t want.
playing with the original image size doesn’t work, because after a certain size, the image is shown the same, regardless of the size