# تجاهل أيقونة الموقع، واستخدم صورة Open Graph الافتراضية لإنشاء وسوم og:image

**URL:** https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995
**Category:** Feature
**Created:** [25 سبتمبر 2018، 8:24ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995 "2018-09-25T08:24:52Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [25 سبتمبر 2018، 8:24ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/1 "2018-09-25T08:24:52Z")

</div>

I have posted forum topics a number of times before on LinkedIn, and always this worked perfectly. A link image was retrieved (in my case showing the Humane Tech frontpage image).

But I just posted to LinkedIn and the image stayed blank. While this may not indicate a bug in Discourse (after all on LinkedIn things are continuously breaking, or behaving oddly), there may be some possible fix in Discourse that has the image show up again.

The LI post URL is:

> **[\#privacy #chrome #gmail #google | Arnold Schrijver](https://www.linkedin.com/feed/update/urn:li:activity:6450383507352010752)**
>
> With the release of Chrome version 69, Google has introduced some changes - without announcing them - that have caused a huge outrage in the tech communities. Regular users may not be aware of this, but should be made aware, so they can make informed...

And the forum post that this points to is:

> **[Google and Privacy - Collection of articles and discussion](https://community.humanetech.com/t/google-and-privacy-collection-of-articles-and-discussion/2732)**
>
> Note: I have renamed this topic to be a collection of all privacy-related worries surrounding Google. Recent changes to Google Chrome cause huge uproar in tech community! With the release of Chrome version 69, Google has introduced some changes -...

If you think this is a LI issue, then I will create a support case there..

This is the image that was shown before:

 ![Humane Tech front-page image](https://global.discourse-cdn.com/meta/original/3X/d/d/ddd84fc7621d9e8ffdaa3d8ba205269bc2d6a889.jpeg)

It is not in the open graph metadata of the topic page, but it exists on the [Humane Tech](https://humanetech.com) website.

[According to LinkedIn](https://www.linkedin.com/help/linkedin/forum/question/678872), having the `og:image` tag present should do the trick. So this would imply that previously this was available in the Discourse html source for the topic.

**Note** : I just created a cross-reference to this topic from our Moderators group, but that also does not show the Discourse logo in the link preview.

---

<div class="post-metadata">

### Author: ![robmc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robmc/32/125900_2.png) [@robmc](https://meta.discourse.org/u/robmc)
#### Post date: [25 سبتمبر 2018، 8:47ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/2 "2018-09-25T08:47:32Z")

</div>

As a matter of interest, have you added a link to the `default opengraph image url` setting?

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/9/a90bef1c55c8c585453bf5b56e5f36b6f301fdb0.png)

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [25 سبتمبر 2018، 8:51ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/3 "2018-09-25T08:51:40Z")

</div>

Thank you for that hint, @robmc!

This field was indeed empty. So I have added the link there, and will now fix LI post.

But what I find strange is that before this always worked for us, and suddenly it is not. AFAIK no other mods/admins have made changes. Is this a new setting, or where there changes that may have cleared the setting?

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [25 سبتمبر 2018، 9:17ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/4 "2018-09-25T09:17:46Z")

</div>

Hmm, but now to get that URL to be used.

I searched a bunch of meta topics on how to upload. I have tried providing an external link, not working, then to upload an asset to the Default theme and use that as open graph, which didn’t work. Then I found a topic that said I should upload to the staff topic ‘Assets for the site design’, which I did , but setting the upload URL still does not give me an Open Graph image.

When I do an Open Graph check it shows the Wordpress icon is used. This comes somewhere from default Discourse setting, but not from our settings. There are uploads references in our settings that seem not to be used, like the `favicon url` (don’t know where I can find the source of these uploads, also)

---

<div class="post-metadata">

### Author: ![robmc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robmc/32/125900_2.png) [@robmc](https://meta.discourse.org/u/robmc)
#### Post date: [25 سبتمبر 2018، 9:26ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/5 "2018-09-25T09:26:03Z")

</div>

First thing, it may not be immediate for the site to fetch the new image - I am not sure off the top of my head whether this happens directly or part of a routine (my colleagues are travelling at the moment so I will get back to you on this)

Secondly, if you are testing the OG, then (after waiting for the above) you may need to ensure they clear any cached versions of the OG info for your domain, then test again.

The URL path can be any you want but if you need to add a new image specifically, then yes, the site assets works fine.

I am not 100% certain that this is the issue that will fix LinkedIn but I know that the OG image has been added to give a better fall-back option should it not locate an image as part of the normal process. LI has been making lots of changes to their interface and this could be part of that instead.

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [25 سبتمبر 2018، 9:31ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/6 "2018-09-25T09:31:16Z")

</div>

I think there is some routine that should occur, as the current og tags are still:

```html
<meta name="twitter:image" content="https://s1.wp.com/i/favicon.ico" />
<meta property="og:image" content="https://s1.wp.com/i/favicon.ico" />

```

I’ll wait for a while, and then try again. Thank you for your help Robert!

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [25 سبتمبر 2018، 10:24ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/7 "2018-09-25T10:24:02Z")

</div>

I just remembered some other functionality in how `og:image` meta tags are created on Discourse: If a topic/post has a link preview on it, then the `og:image` is derived from this URL.

I think this is a cool feature, in principle, but it does not seem to work properly in this case.

My first link preview in my topic is to:

> **[Why I’m done with Chrome](https://blog.cryptographyengineering.com/2018/09/23/why-im-leaving-chrome/)**
>
> This blog is mainly reserved for cryptography, and I try to avoid filling it with random “someone is wrong on the Internet” posts. After all, that’s what Twitter is for! But from …

And I think the Wordpress icon is coming from there, even though this site has a different `og:image` in its metadata, that points to [https://matthewdgreen.files.wordpress.com/2018/09/untitled-3.png](https://matthewdgreen.files.wordpress.com/2018/09/untitled-3.png)

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [25 سبتمبر 2018، 10:36ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/8 "2018-09-25T10:36:23Z")

</div>

I can confirm that this is the case. When replacing the link preview with a regular link, the `og:image` contained the image from the 2nd link preview in my post. When removing that one, it did not change to the default Humane Tech open graph image, but kept the last image.

And testing on LinkedIn. It does not seem to work. LinkedIn still does not give me a preview image when sharing.

**Edit** : I asked a question on this in the LI forum: [https://www.linkedin.com/help/linkedin/forum/question/681319](https://www.linkedin.com/help/linkedin/forum/question/681319)

---

<div class="post-metadata">

### Author: ![robmc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robmc/32/125900_2.png) [@robmc](https://meta.discourse.org/u/robmc)
#### Post date: [25 سبتمبر 2018، 10:54ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/9 "2018-09-25T10:54:35Z")

</div>

To be honest, it looks like there is something amiss on your blog setup

It seems that Discourse renders the image fine, but if you test the blog post with iFramely there are some odd results. You might want to search there before changing too many things on Discourse

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/9/89d03132abddff6ca9c760185c7bdae223a1b50d.png)

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [25 سبتمبر 2018، 11:14ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/10 "2018-09-25T11:14:44Z")

</div>

The result that is shown is actually correct after the edits I made (sort of). The ‘Signed-in Chrome mode’ comes from the `og:image` in the second link that used to have a link preview.

Since my post does not have link previews anymore I expected the og:image to fall back to the default specified in Settings, but it kept the image from the last link preview that I removed.

Also, this image has once again changed, and on iFramely it is now showing a different image than the one you posted. But this is the one I actually wanted. BTW, I test open graph with [https://opengraphcheck.com/](https://opengraphcheck.com/)

The image now shown is as below, and coming from [this link](https://blog.lukaszolejnik.com/am-i-logged-in-or-not-gdpr-case-study-on-the-example-of-chrome-browser-change/):

 ![](https://global.discourse-cdn.com/meta/original/3X/7/5/759a56450fd061ea5482e0850fd7b353c79fa57d.png)

Still LI is not showing this.

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [25 سبتمبر 2018، 4:06م UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/11 "2018-09-25T16:06:38Z")

</div>

I am not sure what is the exact problem, but in the end the Discourse post has the right `og:image`, so I assume the issue is at LinkedIn.

I have finally decided to post without the preview image. Thank you for your help!! I’ll mark resolved.

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [1 أكتوبر 2018، 8:16ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/13 "2018-10-01T08:16:00Z")

</div>

I was still working with LinkedIn on a Support Case, and they asked me to test again (after generating a preview they require 48 hrs before retrying, to ensure their cache is cleared).

On LinkedIn the preview generation now works (takes image from `og:image` in discourse topic page), but I noticed something else:

Consider this topic: [Personal data as currency - Privacy - Humane Tech Community](https://community.humanetech.com/t/personal-data-as-currency/2748)

You see the nice onebox preview image on the [NPR.org](http://NPR.org) link:

 ![link preview](https://global.discourse-cdn.com/meta/original/3X/6/7/67b566662d4744b55dd77af74d48bb19c986ba6e.jpeg)  
.

But the `og:image` meta element in the page source has this image instead:  
 ![og:image contents](https://global.discourse-cdn.com/meta/original/3X/a/f/afe1576c0c4259f8d01285ab082ef3d3607a63e9.png)

Which looks really bad when sharing on LinkedIn or other places, because it is enlarged so much that it looks low-res.

I’d expect the first image to end up on the `og:image`.

---

<div class="post-metadata">

### Author: ![robmc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robmc/32/125900_2.png) [@robmc](https://meta.discourse.org/u/robmc)
#### Post date: [1 أكتوبر 2018، 9:45ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/14 "2018-10-01T09:45:58Z")

</div>

I think I see what you are saying now - and this should probably be classed as a Feature request rather than support

What I think we are saying is that Onebox works fine. If you take a link from another site that is configured correctly, then you get an attractive preview with the correct image, such as this:

> **[No Cash Needed At This Cafe. Students Pay The Tab With Their Personal Data](https://www.npr.org/sections/thesalt/2018/09/29/643386327/no-cash-needed-at-this-cafe-students-pay-the-tab-with-their-personal-data)**
>
> For free coffee, students can provide their names, phone numbers, email, majors and interests. This information is then provided to corporate sponsors who want to "diversify students' career choices."

What happens is that the **topic in Discourse** uses the first image it find as its `og:image` reference. If there is no other image included in the OP but there is a oneboxed link, that first image will be the favicon rather than the oneboxed ‘featured’ image.

When you share the link to the topic to another site (whether Discourse, LInkedIn, or others) then the image used is the favicon, like this:

> **[Personal data as currency](https://community.humanetech.com/t/personal-data-as-currency/2748)**
>
> Just read this on the NPR site: No Cash Needed at This Cafe. Students Pay the Tab with Their Personal Data. A few paragraphs from the article: Shiru Cafe looks like a regular coffee shop. Inside, machines whir, baristas dispense caffeine and...

So what would fix this would be to ignore favicon images when creating `og:image` tags (maybe use the site’s `default opengraph image url` instead). Is this correct?

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [1 أكتوبر 2018، 10:03ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/15 "2018-10-01T10:03:14Z")

</div>

Yes, exactly. Thanks for your elaborate reaction!

The first issue I had on LinkedIn did not show any preview image, because `og:image` contained the Wordpress ICO favicon, which is not a supported image format at LinkedIn. After editing the message I did not see a change on LI, because it may take 48 hrs for the cache to be cleared. (Which led to a lot of troubleshooting, because I did not know that).

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [1 أكتوبر 2018، 11:33ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/16 "2018-10-01T11:33:33Z")

</div>

I just renamed the topic and made it a feature request.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2 أكتوبر 2018، 12:54ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/17 "2018-10-02T00:54:15Z")

</div>

@techAPJ did we not have a bunch of discussion previously about this, I recall us playing with the defaults here at least once before.

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [3 أكتوبر 2018، 7:08ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/18 "2018-10-03T07:08:35Z")

</div>

Would like to read those. Wonder what the reason is to not use the Open Graph that already exists in the site, to build the Onebox link preview.

Maybe this is a bug instead of a feature request?  
I bump into the issue quite often. Just now with Termly, that has full open graph info:

> **[Free Privacy Policy Generator | Create a GDPR/CCPA Privacy Policy](https://termly.io/products/tl/privacy-policy-generator/)**
>
> Use our privacy policy generator to create a CCPA, GDPR, and CalOPPA compliant privacy policy for your website, app, or software service.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [3 أكتوبر 2018، 9:36ص UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/19 "2018-10-03T09:36:39Z")

</div>

> [@robmc](#):
>
> What happens is that the **topic in Discourse** uses the first image it find as its `og:image` reference. If there is no other image included in the OP but there is a oneboxed link, that first image will be the favicon rather than the oneboxed ‘featured’ image.

Sorry @aschrijver what is the problem? I think Rob correctly answered your question. Make sure the linked topic (or post) has a large image in it near the top (if not at the top) and you should be fine.

---

<div class="post-metadata">

### Author: ![aschrijver](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aschrijver/32/92004_2.png) [@aschrijver](https://meta.discourse.org/u/aschrijver)
#### Post date: [3 أكتوبر 2018، 12:50م UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/20 "2018-10-03T12:50:22Z")

</div>

Oops, @codinghorror this is my bad. I mixed up 2 topics. The [termly.io](http://termly.io) issue should be part of [https://meta.discourse.org/t/no-open-graph-link-previews-for-mozilla-and-firefox-urls/98190](https://meta.discourse.org/t/no-open-graph-link-previews-for-mozilla-and-firefox-urls/98190). and now that I ‘unmix’, this is probably another case where the Onebox User-Agent was blocked.

Sorry for the confusion.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [3 أكتوبر 2018، 2:48م UTC](https://meta.discourse.org/t/ignore-favicon-use-default-open-graph-image-to-create-og-image-tags/97995/21 "2018-10-03T14:48:06Z")

</div>

This topic (linked post in particular) has lots of info about how we handle opengraph image tags:

[https://meta.discourse.org/t/facebook-opengraph-images-not-working-on-the-homepage/46086/22?u=techapj](https://meta.discourse.org/t/facebook-opengraph-images-not-working-on-the-homepage/46086/22)
