Oembed not working

I’m writing a post in my site, and when I paste a link, it makes the call to https://myblog.com/ghost/api/v3/admin/oembed/?url=https%3A%2F%2Fwww.megunolink.com%2Farticles%2Fwireless%2Fhow-do-i-connect-to-a-wireless-network-with-the-esp32

But I’m getting a validation error:

Which is very weird, because I’ve pasted this link in the past in other of my posts and it worked properly.
The link is: How do I connect to a wireless network with the ESP32? - Wireless - MegunoLink

I’ve also checked it to see if that page has the proper tags, and it seems fine: Iframely URL Debugger - Open Graph, Twitter Cards, oEmbed

I have no idea why this is not working now. I’ve restarted my ghost instance and still nothing.

Any ideas?

Thanks.

I’m guessing you’re trying to use the bookmark card with this link? Seems like it’s trying to get the metadata of the page but some error on that page is causing it to fail. You can get around this by adding URL as a regular text link :blush:

I was just pasting the URL, and it starts loading and after that it just shows the URL (while I want it to show with “preview”)

Funny enough, I’ve tried with “bookmark” and it actually shows correctly:

Interesting…
I’ve checked the URL being called when adding it as a bookmark and it is:

https://myblog.com/ghost/api/v3/admin/oembed/?url=https%3A%2F%2Fwww.megunolink.com%2Farticles%2Fwireless%2Fhow-do-i-connect-to-a-wireless-network-with-the-esp32&type=bookmark

So the only difference is the type=bookmark parameter :man_shrugging:t4:

Do you know why it only works when doing it as a bookmark?? :thinking:

Thanks!

I think the API URL doesn’t matter. I’m guessing this is no longer an issue if you’re able to create a bookmark? :blush:

1 Like

It’s possible the oembed link that is provided by that site was timing out, it seems like it can be quite slow at times.

Ghost’s oembed endpoint will timeout after 2 seconds when attempting to fetch the oembed content in order to avoid slowing down the editing experience or causing resource contention issues.

2 Likes

Yes, not an issue anymore for me as I was able to get it with the bookmark option you pointed out.
I was just worried this was a bug, since it doesn’t work consistently when I just paste the URL.

But yeah, solved for me.

Thanks guys :slight_smile:

1 Like