How to Disable Auto Embed Script for WordPress 5.4+ – wp-embed.min.js

From the post body we can find the following code:
<blockquote class=”wp-embedded-content” data-secret=”Gp5UKmVoxk”><a href=”https://www.cheapgalsses123.com/”>Cheap Glasses</a></blockquote>
<iframe class=”wp-embedded-content” style=”position: absolute; clip: rect(1px, 1px, 1px, 1px);” title=”“Welcome” — Asia Actual” src=”https://www.cheapgalsses123.com/embed/#?secret=Gp5UKmVoxk” width=”600″ height=”338″ frameborder=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no” sandbox=”allow-scripts” data-secret=”Gp5UKmVoxk”></iframe>

And we can find the following code at footer:
<script src=’https://kingphp.com/wp-includes/js/wp-embed.min.js?ver=5.4.1′></script>

So we need 2 steps to remove these codes:
Step 1, remove, <script src=’https://kingphp.com/wp-includes/js/wp-embed.min.js?ver=5.4.1′></script>
Edit your theme functions.php, add the following code:

// Remove wp-embed.min.js from footer
function crunchify_stop_loading_wp_embed() {
if (!is_admin()) {
wp_deregister_script(‘wp-embed’);
}
}
add_action(‘init’, ‘crunchify_stop_loading_wp_embed’);

Next step, remove the first paragraph added codes, just install a plug-in called oEmbed Manager