How to oEmbed MySite in WordPress

I think your oEmbed implementation is wrong. You can see in the WP-oEmbed class that WordPress supports four type values: photo, video, link and rich; whereas you’re returning type=image.

From the spec section 2.3.4 it looks like that’s WordPress’s list is complete and ‘image’ isn’t generally supported. You possibly meant type=photo, but those aren’t generally linked and have mandatory height and width properties that you’re not supplying.

So I think your options are:

  • change your oEmbed provider to return a type=rich instead, and generate the HTML to include there
  • extend WordPress to support type=image: implement the oembed_dataparse filter (called from the bottom of the function I linked above), detect type=image there and return the generate HTML you’d want to include from the oEmbed data returned.
    However chances are you’ll also have to extend Gutenberg to work with the new type too, and I’m not sure how to do that.