Hi everyone,
I'm currently working with the Card Gallery control in Power Pages, and I'm experiencing an issue where images are always forced into a square format. It appears that Power Pages automatically scales images to fit but crops parts of them instead of maintaining their original aspect ratio.
Here’s what I’m trying to achieve:
If the image is landscape, I want the width to be 135px and the height to adjust automatically.
If the image is portrait, I want the height to be 135px and the width to adjust automatically.
The full image should be visible without any cropping.
However, Power Pages seems to be forcing a square size, cutting off parts of the image. I've tried overriding the CSS using object-fit: contain;
, aspect-ratio: auto;
, and modifying the width
and height
, but the issue persists. Also tried scale to fit in the styling options but same output.
Are there any known limitations with how images are rendered in the Card Gallery control? Has anyone found a workaround to maintain the entire image without cropping, while ensuring it scales properly?
Thanks in advance for any insights!
WarrenBelz
146,522
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,890
Most Valuable Professional