(ComponentsV2) Rendered Display Size Control for MediaGalleryItem Images #8284
Unanswered
whrvey
asked this question in
API Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Add support for controlling the rendered display size of images in
MediaGalleryComponent, independent of the image's native resolution.Problem
Currently, images rendered inside a
MediaGalleryComponentare displayed at a size derived from their native resolution. This means a high-resolution image (e.g. 1920×1080) can expand the component's container to an unintended size, while a low-resolution image may render too small - with no way to control either from the payload.There is no exposed property to constrain or scale how an image is visually presented, only what image is shown.
Example
When generating images via canvas, I'm forced to choose between two bad outcomes: render at a small canvas size so it looks proportional in the container (but the image is blurry), or render at a high resolution for quality (but it displays far too large).
Solution
A
display_sizeproperty would eliminate this tradeoff entirely. Some possible solutions:0.0and1.0(e.g.0.5renders the image at 50% of its natural display size)widthand/orheightinteger fields (in pixels or as a percentage of the container), with the renderer maintaining aspect ratio if only one axis is specified"small","medium","large","full"- for a simpler APIBeta Was this translation helpful? Give feedback.
All reactions