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

Bluesky: GIF support? (blocked on Bluesky) #1113

Open
dploeger opened this issue Jun 5, 2024 · 11 comments
Open

Bluesky: GIF support? (blocked on Bluesky) #1113

dploeger opened this issue Jun 5, 2024 · 11 comments
Labels

Comments

@dploeger
Copy link

dploeger commented Jun 5, 2024

In this reply to a Bluesky user, the GIF wasn't available on Bluesky. Only the user handle was visible.

Sending a normal picture in a reply works though.

@snarfed snarfed transferred this issue from snarfed/bridgy Jun 5, 2024
@snarfed snarfed changed the title Bluesky: GIF lost on a reply on Mastodon Jun 5, 2024
@snarfed
Copy link
Owner

snarfed commented Jun 5, 2024

Yes! Bluesky doesn't support GIFs as normal images, it has some kind of custom thing. Maybe Tenor specific? I haven't dug into it yet. First step here would be to find docs and understand what that custom GIF support is and how to integrate with it.

(BTW @dploeger this is the repo for Bridgy Fed, not https://github.com/snarfed/bridgy . That repo is for Bridgy classic, https://brid.gy/ , a separate service. https://brid.gy/about#bridgy-fed )

@dploeger
Copy link
Author

dploeger commented Jun 5, 2024

Oh sorry. I was confused with the two. Thanks for investigating!

@qazmlp
Copy link

qazmlp commented Jun 5, 2024

The gist is that Bluesky currently doesn't support custom gifs. (Tenor is essentially a searchable meme-library that users can pick existing stuff from.)

It's possible to submit gifs to Tenor off-site, but I'm pretty sure that doesn't mesh well with retaining control or even attribution over content.

@dploeger
Copy link
Author

dploeger commented Jun 5, 2024

I actually thought the GIF would just be an attachment. Apparently it's way more complex than that.

@qazmlp
Copy link

qazmlp commented Jun 5, 2024

I assume it will be an attachment, eventually, whenever Bluesky adds actual video support. For now it only has meme-support though.

(I checked the Tenor ToS and I don't think this is compatible with Bridgy in terms of requirements and what it does with the uploads.)

Edit: It would be good to link back to the original with a note that a gif/video wasn't bridged.

@dploeger
Copy link
Author

dploeger commented Jun 5, 2024

Ohhh okay.

@snarfed
Copy link
Owner

snarfed commented Jun 5, 2024

OK you all got me morbidly curious in this 😆. As an example, here's the app.bsky.feed.post record for this post with a GIF:

{
   "cid" : "bafyreif6pd2quzdsunypranwhwpzvjunlymkjhmyulkhez644tpdejyp4e",
   "uri" : "at://did:plc:dcbbpup73qyoy465ivi365w7/app.bsky.feed.post/3ku2e7pmo5t23",
   "value" : {
      "$type" : "app.bsky.feed.post",
      "text" : "Hard to choose between this gif and a \"more!\" gif"
      "createdAt" : "2024-06-03T20:54:50.313Z",
      "embed" : {
         "$type" : "app.bsky.embed.external",
         "external" : {
            "description" : "ALT: Totally GIF",
            "thumb" : {
               "$type" : "blob",
               "mimeType" : "image/jpeg",
               "ref" : {
                  "$link" : "bafkreifgx43jldfxwrstya56izmdmhrulybzxyasn2mofu7hn3qbehp53a"
               },
               "size" : 607873
            },
            "title" : "Totally GIF",
            "uri" : "https://media.tenor.com/ZttURy99Kn8AAAAC/good-great.gif?hh=172&ww=250"
         }
      },
      "..."
   }
}

So, GIFs are an app.bsky.embed.external embed with a thumbnail JPG blob and uri pointing to the Tenor gif. bsky.app renders the embed as the GIF itself, animated.

The natural next step would be to try making a record like this with a GIF elsewhere and see if it still works. I'm guessing no, but it's possible.

@qazmlp
Copy link

qazmlp commented Jun 5, 2024

I'm also thinking "no" since that'd enable IP grabbers.
(The frontend loads these embeds directly from the target server.)

Maybe you could get them to allow-list Bridgy Fed for embeds though?
The main downside is you'd potentially get hit with a lot of traffic due to the lack of cache there.

@snarfed
Copy link
Owner

snarfed commented Jun 5, 2024

Heard from the Bluesky team on Discord, sounds like the answer is no.

basically our GIFs have to use a very specific tenor media URL, and also include the height and width of gif in the url search params

As for allowlisting, BF doesn't currently host media, so they couldn't easily whitelist it. I could serve redirects, but that's only minimally useful, if at all.

@snarfed snarfed changed the title Bluesky: GIF support? Jun 5, 2024
@snarfed snarfed added the blocked label Jun 5, 2024
@qazmlp
Copy link

qazmlp commented Jun 5, 2024

Hitting the fedi instances' media servers directly from a foreign frontend would be very bad, yeah.
(I don't think Bridgy currently hosts media, please correct me if I'm mistaken.)

@snarfed
Copy link
Owner

snarfed commented Jun 5, 2024

Right. I wouldn't plan to proxy the connections for those media files anyway, I'd just redirect. Regardless, all purely hypothetical right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants