This is a cross-post from Github discussion: Increasing Bluesky Post Image Size Limit · bluesky-social/atproto · Discussion #4832 · GitHub
The app.bsky.embed.images lexicon currently limits image blobs to at most 1 MByte (one million bytes). @estrattonbailey is planning to increase this to 2 MByte (two million bytes). We will do this by publishing an updated lexicon and TypeScript SDK, and then enabling support in the Bluesky app. We are hoping to get started this week.
Though not encoded in lexicon schemas, the bsky client and CDN will also start allowing image dimensions up to 4000 by 4000 pixels (up from 2000 by 2000).
There are two aspects to this change:
- what this pragmatically means for other devs and projects: bsky app clients, indexing services, PDS hosts, etc
- what this means in terms of lexicon evolution rules and stability
It is worth noting that we expect to follow on with additional changes to image embeds in the near future, such as supporting a “gallery” embed type with more than four images. We’ll do separate developer communications about those changes when the details are settled.
Ecosystem Impact
We don’t expect the image size change to be particularly disruptive for most developers and projects, but it is worth checking when and where strict lexicon validation happens.
PDS operators will, over time, see a marginal increase in blob storage size and bandwidth, as bsky users upload larger images. The bsky video size limits are already much larger (100 MByte or more), so this should not run in to PDS configuration issues.
Independent appviews and client apps may need to update any lexicon validation they may be doing, though lexicon validation has not always included blob size validation. Client apps could be updated to allow uploading/resizing larger images, though there is no rush to do so.
Users of the Bluesky-operated image CDN should not need to change anything.
There is a PR tracking this change available here: Increase max image upload size to 2mb from 1mb by estrattonbailey · Pull Request #4823 · bluesky-social/atproto · GitHub
Lexicon Evolution Rules
This change technically breaks the lexicon language evolution rules. New records which are valid under the new limits will look invalid to older software, which is bad for interoperability. The Bluesky team has made similar breaking changes in blob size limits in the past, when video embed sizes were increased.
Breaking the evolution rules sets a bad precedent for the ecosystem. On the other hand, strictness around media blob size limits specifically feel constraining in practice. A number of other lexicon schemas (like pub.leaflet.blocks.image and social.grain.photo) set 1 MByte image size limits, but might want to increase in the future. It feels like blob size limits might be a particular case in lexicon evolution where changes should be allowed. Perhaps an additional flag in the schema blob type could indicate if the maxSize is a “soft” or “hard” (permanent) constraint.
There are alternatives to bumping the blob size limit. We could have defined a new imagesV2 embed type with a new limit. Or we could have added an optional new fullImage field pointing to a larger alternative blob. These feel like a lot of additional complexity for all implementations in the current scenario.
Are there other limits which could also be “soft”? Changing the number of images per embed (from the current max of 4) could be more disruptive to client apps, which might be rendering image layouts in specific ways (handling 1, 2, 3, or 4 images in a specific way, but not knowing how to lay out 5 or more). String length limits are another case where the correct size might not be known when originally designing the lexicon. We are pretty firmly committed to the 300 character (grapheme cluster) app.bsky.feed.post limit: any other size would be a different app modality. But other string limits in schemas (such as alt text size, or moderation report size) are a bit more arbitrary. Having some defined limit can help set expectations and prevent certain types of abuse, but the ability to evolve those limits seems helpful.
What do you think?