WordPress.org

Make WordPress Core

Opened 4 weeks ago

Closed 7 days ago

#46067 closed enhancement (reported-upstream)

Add support for oembed for Giphy

Reported by: spacedmonkey Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Embeds Keywords: has-patch
Focuses: Cc:

Description

According to oembed.com, Giphy as an oembed endpoint. This should be officially supported by core.

Attachments (5)

Screenshot from 2019-01-22 21-39-33.png (142.3 KB) - added by spacedmonkey 4 weeks ago.
46067.diff (1.0 KB) - added by spacedmonkey 4 weeks ago.
46067.2.diff (1.7 KB) - added by spacedmonkey 4 weeks ago.
Screenshot 2019-02-11 at 13.31.18.png (253.7 KB) - added by spacedmonkey 8 days ago.
Auto discovery works on the front end.
Screenshot 2019-02-11 at 13.31.13.png (23.6 KB) - added by spacedmonkey 8 days ago.
Auto discovery doesn't work on the backend.

Download all attachments as: .zip

Change History (18)

#1 @peterwilsoncc
4 weeks ago

  • Keywords reporter-feedback needs-patch added

@spacedmonkey Are you able to add a comment answering each of the questions on the whitelisting checklist?

#2 @spacedmonkey
4 weeks ago

@peterwilsoncc details about giphy can be found on it's wiki page which quote "200 million daily active". Been around for 6 years and powers gif searchs on most apps I use facebook message, tinder, twitter, slack etc.

I am testing the oembed endpoint now, with an upcoming patch.

https://core.trac.wordpress.org/raw-attachment/ticket/46067/Screenshot%20from%202019-01-22%2021-39-33.png

Last edited 4 weeks ago by spacedmonkey (previous) (diff)

@spacedmonkey
4 weeks ago

#3 @spacedmonkey
4 weeks ago

  • Keywords has-patch needs-testing added; needs-patch removed

#4 @swissspidy
4 weeks ago

  • Keywords needs-patch added; has-patch removed

Patch needs docs, also all the checklist questions need to be answered. Especially the ones about oEmbed discovery and endpoint documentation.

#5 follow-up: @spacedmonkey
4 weeks ago

Is the service is popular enough for core developers to have heard of it before? Is it “mainstream?”

Giphy powers the gif interface for twitter, whatapps and facebook messager. You may have never heard of the brand, but you used this service.

If similar services are already supported, how does this service compare in terms of size, features, and backing?

There isn't another gif service in Core. This would be the first.

Does this service have a large following on Twitter, Facebook, or other social media? Is its Twitter account verified?

https://www.facebook.com/GIPHY/ - 1m followers
https://twitter.com/GIPHY - Verified - 256k followers.

Is its oEmbed endpoint clearly established and properly documented?

I can't find anymore documention for it on the developer site. https://developers.giphy.com/docs/

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 whitelisted?

It works with auto discovery for one of the 3 support url pattern.

Does the service make an effort to build relationships with developers, such as through robust APIs?

There is a well documented api found here https://developers.giphy.com/docs/

How old is the service?

Founded in 2013. So 6 years.

Does it have a well-established Wikipedia article? (Seriously.)

https://en.wikipedia.org/wiki/Giphy

Has anyone written a WordPress plugin that leverages the service in some way, whether adding it as an oEmbed provider, creating a shortcode, or leveraging other APIs of the service? Do these plugins have any noticeable adoption or traction that would indicate usage and demand?

https://wordpress.org/plugins/giphypress/ - 6,000+ installs /
https://github.com/youknowriad/dropit - Plugin by @youknowriad and @desrosj

Is the provider frequently proposed?

This seems to be the first ticket for this.

@spacedmonkey
4 weeks ago

#6 @spacedmonkey
4 weeks ago

@swissspidy I updated patch in 46067.2.diff, that the docs you were speaking of?

#7 @spacedmonkey
3 weeks ago

  • Keywords reporter-feedback removed

#8 @spacedmonkey
10 days ago

  • Keywords has-patch added; needs-testing needs-patch removed

It is worth noting, that jetpack 7.0 now has added support for giphy. This confirms a demand for this and means that this is something that core should do.

#9 @swissspidy
10 days ago

  • Milestone changed from Awaiting Review to Future Release

#10 in reply to: ↑ 5 @peterwilsoncc
8 days ago

Replying to spacedmonkey:

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 whitelisted?

It works with auto discovery for one of the 3 support url pattern.

Are you able to expand on this a little more?

I'm able to embed via auto-discovery (ie, without a plugin) and there's no code in the embed blocked by WordPress Core. The embed uses the photo type listed in \WP_oEmbed::data2html().

If the oembed link tag isn't included on some URLs then it's best to contact giphy for support.

@spacedmonkey
8 days ago

Auto discovery works on the front end.

@spacedmonkey
8 days ago

Auto discovery doesn't work on the backend.

#11 @spacedmonkey
8 days ago

@peterwilsoncc Not sure I understand any of your last comment. Does the above feedback mean this patch will not get merged.

But did try using auto discovery, but it didn't work correctly for me. Not sure what I am doing wrong. See attached screenshots.

#12 @spacedmonkey
8 days ago

I have also created a ticket on the gutenberg repo. See https://github.com/WordPress/gutenberg/issues/13426

#13 @peterwilsoncc
7 days ago

  • Milestone Future Release deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

It looks like it's an issue with the block editor's processing of the photo embed data type. I've added some notes and a Gif to #13426-gutenberg.

I'll close this ticket as reported upstream to allow the editor team to fine tune the embed blocks.

Note: See TracTickets for help on using tickets.