bluesky-social / atproto

Social networking technology created by Bluesky
Other
6.49k stars 453 forks source link

Increase image-size constraints (post embeds, user profiles) and served resolutions #502

Closed pfrazee closed 1 year ago

pfrazee commented 1 year ago

We need to improve the quality of images a smidge more. Here's my proposal:

This is roughly a 2x of all limits. For the image-proxy serving, we also 2x all the limits and we revert the thumb sizing away from "fit" (as that wrecks the ability to serve wide images).

I suggest if we want to consider any higher limits that we look closely at the costs -- not of image storage or bandwidth, but specifically of transfer latency in the federated network. The reason we're being stingy is to ensure that peoples' feeds load in a timely fashion when the extra hops of federation are introduced.

dholms commented 1 year ago

I'm wondering if we should go even bigger for embeds? Like up to at least a MB. Just from a quick survey of twitter, they have a lot of images that are greater than 600 kb. As Jake pointed out, these are gonna be insubstantial in comparison to videos.

I expect most images to be served off of a gateway that does some processing, which means that the images only really have to make a couple hops: client -> pds -> BGS (which then serves it off the gateway).

From the gateway, we don't have to serve the full resolution image, but I think we should give the clients some more wiggle room in terms of what they upload.

pfrazee commented 1 year ago

I'll let yall make the call here, just want to make sure we get it right. If you're not worried about the latency of 1mb then go for it.

dholms commented 1 year ago

kk @pfrazee wanted to check in on

we revert the thumb sizing away from "fit"

what's the desired behavior here for thumbs? They're already set to cover which === fill. Is that right? Or do we want inside which === fit?

dholms commented 1 year ago

Oh actually I see, that was a recent change from https://github.com/bluesky-social/atproto/pull/495 that hasn't made it to prod yet 👌