[wp-trac] [WordPress Trac] #61020: Add Bluesky (bsky.app) to oEmbed allowlist

WordPress Trac noreply at wordpress.org
Wed Apr 24 08:45:43 UTC 2024


#61020: Add Bluesky (bsky.app) to oEmbed allowlist
--------------------------+------------------------------
 Reporter:  bnewboldbsky  |       Owner:  (none)
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Embeds        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by swissspidy):

 > Does this service have an established social media presence?

 Just for completeness sake:

 [https://bsky.app/profile/bsky.app ~900k followers] on Bluesky itself
 [https://twitter.com/bluesky ~300k followers] on Twitter/X.

 > > Is its oEmbed endpoint clearly established and properly documented?
 (Sometimes, they are just a developer’s pet project that may not be
 supported.)
 > The oEmbed endpoint is new, but official and part of the core service.

 I couldn't find any documentation at https://docs.bsky.app/ about the
 oEmbed endpoint.

 I suggest adding some :)

 > Does the oEmbed endpoint work with WordPress’ oEmbed auto-discovery? If
 not, could it be made to work with additional HTML tags or attributes
 being added to the allow-list?

 I just tested this post:
 https://bsky.app/profile/bsky.app/post/3kqjaq2begs2s

 The oEmbed endpoint referenced in the HTML seems to be:
 https://embed.bsky.app/oembed?format=json&url=at%3A%2F%2Fdid%3Aplc%3Az72i7hdynmk6r22z27h6tvur%2Fapp.bsky.feed.post%2F3kqjaq2begs2s

 The post can't be embedded right now because WordPress passes
 `maxwidth=600` and `maxheight=750` by default, but this is not supported
 by Bluesky. So the requested
 `https://embed.bsky.app/oembed?format=json&url=https%3A%2F%2Fbsky.app%2Fprofile%2Fbsky.app%2Fpost%2F3kqjaq2begs2s&maxwidth=600&maxheight=750&dnt=1`
 URL leads to a HTTP 400 response saying "Invalid maxwidth (expected
 integer between 220 and 550)".

 Minor detail: Also looks like `maxheight` is not respected. And the
 returned `height` is always `null`.

 @bnewboldbsky My suggestion: don't return an error for out-of-bounds
 maxwidth, just silently enforce the minimum and maximum. So if a consumer
 like WP passes `maxwidth=600` and you return an embed with width 550,
 that's totally fine.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61020#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list