Skip to main content
2 of 4
added 1 character in body

I arrived at this thread with the same question: What does the wp-embed.min.js file do? None of the current answers accurately address this question.

Firstly, I am fairly certain that embed.min.js does not relate to embedding oEmbed content from other providers: Vimeo, YouTube etc. You can remove embed.min.js and those embeds will continue to function.

It relates specifically to embeding WordPress posts from other people's blogs/websites. Embedding WordPress posts inside WordPress posts: so meta! This feature was introduced in WordPress 4.4.

Disabling embed.min.js will stop that feature from working on your site.

You can test this easily: Paste the URL of someone else's WordPress post into one of your own posts. WP should convert that URL into an embedded widget. When you view your post on the front-end you will notice that your markup contains a blockquote and an iframe. The blockquote is a text-only link to the blog post you embedded, while the source of the iFrame is the blog post's URL with /embed/ appended: its oEmbed endpoint.

By default the blockquote is visible but the iframe is hidden. What embed.min.js does is hide the blockquote and reveal the iframe. It also does some other shenanigans to make the iframe play nice.

Now, try removing the embed.min.js script from your page using one of the methods described in the other answers. Reload your page and you'll notice that the blockquote is visible but the iframe is hidden.

In short: if you want to embed other people's WordPress posts on your own, leave embed.min.js alone. If you don't care about this feature then you can safely remove it.