rio-labs / rio

WebApps in pure Python. No JavaScript, HTML and CSS needed
https://rio.dev
Apache License 2.0
453 stars 14 forks source link

Better Image Sizing #65

Open mad-moo opened 2 weeks ago

mad-moo commented 2 weeks ago

When displaying images, it's often hard to size them correctly. If not setting both width and height, the size of the image collapses, not taking up enough space. But when specifying both of them, one needs to know the aspect ratio of the image lest the result take up too much space, resulting in large areas of empty space.

It's not really clear how to address this. One solution could be to specify the diagonal instead, and have the image calculate the width & height based on the image's aspect ratio.