Why is my site icon (favicon) missing from OneBox?

I notice, that whenever I embed my own link (WordPress site) into my Discourse forum, the site icon (favicon) to my WordPress site is not present next to the site title as it is in the example below.

Is there a reason for that?

1 Like

Has it ever worked for you? Is your Wordpress site http or https?

3 Likes

I thought I remember it working, but I could be mistaken.

This sounds like a good explanation.

2 Likes

Actually mixed content is more common reason, I reckon. But I tried few moments ago here using link from my own WordPress site and it was showing favicon nicely. So, the issue comes from OP indeed, and is not something strange glitch between Discourse and WordPress per se.

1 Like

https all around, been that way for years now.

I even checked the favicon.ico file and it’s https.

I wonder if there’s a plugin conflict…

2 Likes

I can confirm it’s not a plugin.

I spun up a dev site, turned off all the plugins, and still no dice.

Madness.

2 Likes

Are you seeing a broken-image icon, or is there just nothing displayed where the site icon should be?

You could post a link to your site here, or in a PM that you send to yourself (or me) on Meta to rule out that it’s an issue related to your Discourse forum.

I’m not sure if any of the online oembed debuggers return data about the site icon. Normally for issues related to site’s not creating Discourse oneboxes, I’d suggest trying here: Explore Embed | Embedly, but I’m not sure that will give you information about the icon/favicon.

3 Likes

Thanks for the ideas Simon.

Yes, I did paste a link from my site to the Discourse instance here on Meta, and the same result. There’s no icon next to the site title. Not even a gap where an icon should be visible.

Thanks for the link, a site icon is not a parameter, a thumbnail is and mine does appear correctly.

Does anyone know what file Discourse looks at to pull in the site icon?

Ironically enough, I just pasted a link from CBS news and there’s no site icon, but NBC news does have one. Not sure what Discourse is looking for, but I must be missing it somewhere…

Does it work if you onebox frontpage?

If I use a link directly to my websites homepage?

No, it still doesn’t work. :man_shrugging:t3:

How did you add the favicon? I mean are you sure you have <link rel="icon" href="/path/to/favicon.ico"> under <head> on every page?

5 Likes

:joy:

Man, you nailed it!

So get this…

I used https://realfavicongenerator.net sometime ago to put together my icon set. However, I forgot the part where I was supposed to add the generated code to the head section of my site. :man_facepalming:t3: I had all the images in the right spot though, so everything was working except this one instance.

Hey brother, thanks for the help on this one. :+1:t3:

3 Likes

That was an issue at early years when everything was done ”manually” and if one had favicon on root directory it was enough.

Nowadays we are normally using some seo-plugin and those do everything required under the hood and all what is needed is uploading an image - and not even format nor size is so important anymore. And perhaps that is the main reason why you, I or anyone else didn’t think such… 101 level reason :stuck_out_tongue_closed_eyes:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.