Open clarfonthey opened 5 years ago
The simplest way to do this is with CSS. You set a fixed size for the image, then set a background colour and the "object-fit" attribute to "contain". This fills the bounds, but retains the aspect ratio (giving you your "letterboxing" or "pillarboxing" effect).
The other way is to change the images themselves with a Ruby Gem that's a wrapper for ImageMagick. However that's computationally expensive and you'd need somewhere to cache the images to mitigate that.
This is a glitch.social feature that we can incorporate. Documentation: https://glitch-soc.github.io/docs/features/media/
I'm a bit iffy on the implementation so I'm going to mark this as abstract.