- What is oEmbed and How Does it Work?
- List of Default oEmbed Providers in WordPress
- Making your own oEmbed
oEmbed is a standardised format that allows you to easily embed content from various third-party sources into your website. With oEmbed, you can embed rich media like videos, images, or tweets just by pasting a URL into your WordPress editor. In this article, we'll discuss what oEmbed is, how it works, and provide a comprehensive list of the default oEmbed providers available in WordPress.
What is oEmbed and How Does it Work?
The oEmbed process in WordPress involves the following steps:
- You paste a URL from a supported oEmbed provider into the WordPress editor.
- WordPress sends a request to the provider's oEmbed API endpoint with the URL and desired output format (typically JSON or XML).
- WordPress inserts the embed code into your post or page and displays the embedded content.
List of Default oEmbed Providers in WordPress
WordPress supports a variety of oEmbed providers by default. Here is a comprehensive list of the available providers, along with brief descriptions and example URLs.
YouTube: Embed videos from YouTube by simply pasting the video URL into the WordPress editor. Example URL: https://www.youtube.com/watch?v=dQw4w9WgXcQ
Vimeo: Embed videos from Vimeo using the video URL. Example URL: https://vimeo.com/76979871
Flickr: Embed photos and image galleries from Flickr using the photo or gallery URL. Example URL (photo): https://www.flickr.com/photos/nasa/29921972503/ Example URL (gallery): https://www.flickr.com/photos/nasa/galleries/72157633932475115
Twitter: Embed tweets, including media and threads, by pasting the tweet URL. Example URL: https://twitter.com/WordPress/status/1636430644640198656
Instagram: Embed Instagram posts, including images and videos, using the post URL. Example URL: https://www.instagram.com/p/CqGGJvwMK_i/
SoundCloud: Embed audio tracks and playlists from SoundCloud using the track or playlist URL. Example URL (track): https://soundcloud.com/eluananakoa/developer Example URL (playlist): https://soundcloud.com/jarret-in-boston/sets/developer
Spotify: Embed Spotify tracks, albums, and playlists using the corresponding URL. Example URL (track): https://open.spotify.com/track/1w8QCSDH4QobcQeT4uMKLm Example URL (album): https://open.spotify.com/album/7e1ICztHM2Sc4JNLxeMXYl Example URL (playlist): https://open.spotify.com/playlist/37i9dQZF1DWXLeA8Omikj7
SlideShare: Embed SlideShare presentations using the presentation URL. Example URL: https://www.slideshare.net/HarshadMane/introduction-to-wordpress-56988878
Scribd: Embed documents from Scribd using the document URL. Example URL: https://www.scribd.com/book/406814699/WordPress-For-Dummies
TED: Embed TED Talks using the talk URL. Example URL: https://www.ted.com/talks/matt_mullenweg_why_working_from_home_is_good_for_business
Tumblr: Embed Tumblr posts, including text, images, videos, and audio, by pasting the post URL. Example URL: https://www.tumblr.com/wordpressvip/703811716841160704/what-is-wordpress-vip
Vine: Embed Vine videos using the video URL. (Note: Vine has been discontinued, but existing embeds should still work.) Example URL: https://vine.co/v/MTFn7EPvtnd
WordPress.com: Embed posts from WordPress.com and WordPress.org sites that support oEmbed by pasting the post URL. Example URL (WordPress.com): https://wordpress.com/blog/2023/03/27/wordpress-wallpapers/ Example URL (WordPress.org): https://make.wordpress.org/core/2020/07/30/wordpress-5-5-field-guide/
Dailymotion: Embed videos from Dailymotion using the video URL. Example URL: https://www.dailymotion.com/video/x7yuhn3
Issuu: Embed Issuu documents using the document URL. Example URL: https://issuu.com/wpmanagedhosting/docs/wordpress-for-beginners-3.8-public
CollegeHumor: Embed videos from CollegeHumor using the video URL. (Note: CollegeHumor has shut down its website, but existing embeds should still work.)
Mixcloud: Embed audio tracks from Mixcloud using the track URL. Example URL: https://www.mixcloud.com/harvardbusinessschool/485-the-creator-of-wordpress/
SmugMug: Embed photos and image galleries from SmugMug using the photo or gallery URL.
Funny or Die: Embed videos from Funny or Die using the video URL. Example URL: https://funnyordie.com/2015/02/26/86462/some-people-wont-realize-this-article-came-from-funny-or-die/
There are lots more oEmbeds available, with more being added regularly. Check out WordPress' official documentation for a list of supported sites.
Making your own oEmbed
If you run a website that hosts rich media content and you'd like to make it easier for others to embed your content, you can implement your own oEmbed provider. To do this, you'll need to create an oEmbed API endpoint that returns the necessary embed code and metadata in a structured format (typically JSON or XML). Once you've set up your oEmbed endpoint, users can take advantage of it by registering your provider in their CMS, like WordPress, using the appropriate function (e.g.,
wp_oembed_add_provider()). oEmbed is a universal technology, not just WordPress, but WP does have the built-in functions to make supporting it easier.
This allows visitors to easily embed your content just by pasting a URL from your site into their editor. Implementing your own oEmbed provider can increase the visibility and reach of your content, making it more accessible and shareable across the web.
WordPress supports a wide range of oEmbed providers by default, making it easy to embed rich media content from popular platforms like YouTube, Twitter, and Instagram. By leveraging oEmbed, you can enhance your content and provide a more engaging and interactive experience for your site's visitors.
You'll find a lot of sites utilise oEmbed, including large media publications such as BBC News.
Interested in proving your knowledge of this topic? Take the WordPress Development certification.
Covering all aspects of WordPress web development, from theme development, plugin development, server set up and configuration and optimisation.