GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
572 stars 61 forks source link

[Request]: Full-width media #180

Open bertob opened 1 year ago

bertob commented 1 year ago

Describe the request

It's a bit odd that images only use half the width when there's just one, especially at narrower widths. Could we special case the single image case and use the full wdith?

image

Implementation Details

GeopJr commented 1 year ago

like so?

image

we can also increase the height: image

bertob commented 1 year ago

Yeah, increasing the height sounds good, so the aspect ratio doesn't get too wide. Could go even taller than what you have there, IMO. Elk doesn't seem to limit the height at all, which seems like a bit much too me. I'd try 4:3 or square as the max aspect ratio.

image

GeopJr commented 1 year ago

4:3 Screenshot from 2023-04-11 01-58-55

square Screenshot from 2023-04-11 01-58-21

bertob commented 1 year ago

I think square could work, but I would not force an aspect ratio for landscape images, and just show the whole image instead, i.e. images taller than 1:1 would be scaled up and clipped, while images wider than 1:1 would be scaled down and shown without cropping (maybe up to a minimum height of like 100px or so, after which they should probably be scaled up and cropped to keep them a reasonable aspect ratio).

bertob commented 1 year ago

This looks fixed to me on the latest main:

image

GeopJr commented 1 year ago

It just makes the attachment bigger, it does not follow the previous comment https://github.com/GeopJr/Tuba/issues/180#issuecomment-1502824771 so I left it open (unless it's good enough as is?)

bertob commented 1 year ago

Mmmh, not sure I follow what it doesn't do to be honest :D

GeopJr commented 1 year ago

Currently the attachment is either cover fitted (the default) or contain fitted (if enabled in settings (letterbox))

images taller than 1:1 would be scaled up and clipped

:heavy_check_mark: cover takes care of it

while images wider than 1:1 would be scaled down and shown without cropping (maybe up to a minimum height of like 100px or so, after which they should probably be scaled up and cropped to keep them a reasonable aspect ratio).

:x: The following image

Screenshot from 2023-07-24 02-54-47

will look like this

image

while you probably are looking for something like this

image

bertob commented 1 year ago

Ah, gotcha! Thanks for explaining, and yes that is what I had in mind :)