Embed issues in WordPress

Hello Gulshan Kumar,

I am using WP Rocket there we have a option of disable embeds but after enabling that we can not be able to upload any YouTube embeds, Twitter or Instagram embeds so I have manually pasted code in Htaccess file to Disable Image Hotlinking in WordPress Using .htaccess:-

`#disable hotlinking of images with forbidden ` `or` `custom image option`

`RewriteEngine on`

`RewriteCond %{HTTP_REFERER} !^$`

`RewriteCond %{HTTP_REFERER} !^http(s)?:` `//(www\.)?domain.com [NC]`

`RewriteCond %{HTTP_REFERER} !^http(s)?:` `//(www\.)?google.com [NC]`

`RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L] `

But after doing this YouTube embeds and some Twitter embeds are working but Instagram embeds are not working, showing Instagram embed fail, translate to link.

Any idea how to short out this issue??

Have you unchecked this?

Ye I have Unchecked this and pasted that code in Htaccess file.

If you keep just unchecked, it should work. Doesn’t that work without that .htaccess, can you double check once?

Ok done didn’t find anything thing that works, here is the guide I was following to protect my site:- https://www.wpbeginner.com/wp-tutorials/9-most-useful-htaccess-tricks-for-wordpress/
Let me tell you I have configured these points:- 3, 4, 5, 8, 9, 10, & 12.

Your embed features depends wp-embed.js and it has nothing to with .htaccess based hotlink protection what code is shared above.

Ok show me some way what to do now??
Have to add or delete any code in wp-embed.js?

It’s already being added. You can test with default theme.

1 Like

Hello @GulshanKumar,

Here i have tested with free and paid themes with Bimber theme newspaper X and now using JNews but still problem is there any suggestion that can help me to short out this issue??

Look up Console logs. It can hint what’s happening.

Sounds nice… .
How to check??

Go to the page where Embed isn’t working. Right click > Inspect Element > Click Console tab

Hello Gulshan Kumar,

Sorry for disturbing, As a expert I need your suggestions, have sent you a screenshot pls check and suggest me that helps me, why the URL is returning from CLOUDFLARE as 404?

In embeds Instagram post embeds what is the role of Cloudflare??

Choose correct block