"object-fit: contain" not working in PrimeNg p-image

Discussão em 'Angular' iniciado por stylepatrick, Agosto 19, 2025.

  1. stylepatrick

    stylepatrick Guest

    CSS "object-fit: contain" does not work in PrimeNg p-image component.

    <p-image [src]="image" alt="Image" appendTo="body" height="550vw" width="100%" style="object-fit: contain"></p-image>


    Is there anything i missed. Also tried it with a different way with the same result:

    [style]="{ objectFit: 'contain' }"

    Continue reading...

Compartilhe esta Página