Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Into Bluesky: images should have aspectRatio, otherwise preview is square #1571

Open
MS-potilas opened this issue Nov 29, 2024 · 11 comments
Open
Labels
compat Protocol differences that need special handling.

Comments

@MS-potilas
Copy link

Related to bluesky-social/social-app#6474

If aspectRatio (width, height) is not set, images are previewed as clipped square. Examples here https://bsky.app/profile/fok-it.eliitin-some.fi.ap.brid.gy

Bluesky client app sets the aspectRatio, but most other clients (including blue deck) and API users don't (and now they're supposed to).

@Tamschi Tamschi added the compat Protocol differences that need special handling. label Nov 29, 2024
@snarfed snarfed changed the title Fediverse => Bluesky images should have aspectRatio, otherwise preview is square Into Bluesky: images should have aspectRatio, otherwise preview is square Nov 29, 2024
@snarfed
Copy link
Owner

snarfed commented Nov 29, 2024

Good point! Specifically, this is the aspectRatio field in app.bsky.embed.images.

Sadly, this is somewhat unlikely. I don't currently do any image processing at all, and I'm reluctant to start. I can keep this open to track though!

@ulrischa
Copy link

Same issue here https://bsky.app/profile/lfu.bayern.de

@snarfed
Copy link
Owner

snarfed commented Nov 30, 2024

@ulrischa looks like that's a normal Bluesky account, not a bridged account.

@ulrischa
Copy link

ulrischa commented Nov 30, 2024

@snarfed yes it is. The problem has nothing to do with bridged or not. There seems to be a breaking change in aspect ratio handling. See bluesky-social/social-app#6800

@roddie-digital
Copy link

For info, Bluesky have implemented a (hopefully temporary) workaround for this in social-app#6828 - images are now displayed in their correct aspect ratio but within a square for their preview. eg:

https://bsky.app/profile/ghostintheshell.roddie.social/post/3lcjthp4mota2

@popet-master
Copy link

So eventually this issue, unrelated to bridgy, gets fixed by Bluesky, as a plain css bug on their side, right ?

@snarfed
Copy link
Owner

snarfed commented Dec 9, 2024

No, I don't think so. They now letterbox instead of cropping so that they don't cut anything out, but they still expect clients to all eventually set aspectRatio.

This isn't a high priority for Bridgy Fed right now, but PRs are welcome, feel free to try!

@Tamschi
Copy link
Collaborator

Tamschi commented Dec 9, 2024

I think it's reasonable for them to do it this way with their architecture, as it decreases service dependencies significantly for them and enables fully asynchronous processing right up to and into the frontend. It's pretty elegant in a way.

@snarfed
Copy link
Owner

snarfed commented Dec 11, 2024

@JoelOtter is currently adding this to granary in snarfed/granary#844, that will do half of this and give us an easy template for the other half. Thank you Joel!

@MS-potilas
Copy link
Author

Can the Granary addition be deployed "as is" to Bridgy Fed, too?

@snarfed
Copy link
Owner

snarfed commented Dec 18, 2024

As described in #1571 (comment), it's half of the solution! The other half is porting https://github.com/snarfed/granary/pull/844/files#diff-1915ad0740506cba5b100e33d222098b9ec534f9f592b600ab55571db03296b0L2175-R2288 to ATProto._convert in atproto.py here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat Protocol differences that need special handling.
Projects
None yet
Development

No branches or pull requests

6 participants