# שיתוף קישור לפייסבוק לא מציג תמונה (open graph)

**URL:** https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869
**Category:** Support
**Created:** [18 ביולי,‏ 2025,‏ 11:08pm UTC](https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869 "2025-07-18T23:08:57Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [18 ביולי,‏ 2025,‏ 11:08pm UTC](https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869/1 "2025-07-18T23:08:57Z")

</div>

I looked around, but can’t seem to find an answer.  
I tried sharing some topics from this forum to Facebook as a test, but none of them show the image. Type of errors I get:

```plaintext
Provided og:image URL
https://global.discourse-cdn.com/meta/optimized/4X/e/0/4/e04203d665f3ff3540361fdeedb76df8cf37df9b_2_1024x767.jpeg could not be processed as an image.
It may be corrupted or may have an invalid format.

```

```plaintext
Could not resolve the hostname into a valid IP address.

```

Anyone lucky enough to share topics and Facebook showing the image properly?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [19 ביולי,‏ 2025,‏ 1:15am UTC](https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869/2 "2025-07-19T01:15:54Z")

</div>

I would love to help except I can’t discern ANY conceivable improvement that we could possibly do here.

The URL is good:

[![](https://global.discourse-cdn.com/meta/optimized/4X/e/0/4/e04203d665f3ff3540361fdeedb76df8cf37df9b_2_1024x767.jpeg) ](https://global.discourse-cdn.com/meta/optimized/4X/e/0/4/e04203d665f3ff3540361fdeedb76df8cf37df9b_2_1024x767.jpeg)

If Facebook can’t resolve a DNS name that belongs to Amazon CloudFront, that’s a Facebook failure. Perhaps they’re having internal troubles?

Or, possibly Amazon, but that’s less likely.

What does Facebook support say about this?

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [22 ביולי,‏ 2025,‏ 4:17pm UTC](https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869/3 "2025-07-22T16:17:44Z")

</div>

I’m a bit confused about the image you shared…?

> [@supermathie](#):
>
> What does Facebook support say about this?

To my knowledge, Facebook “support” doesn’t even exist.

But this doesn’t seem to be a Facebook issue, because on my own Discourse installation, some images are shown, so I would just like to know what’s the process to make them work? Is the first image in the topic? If so, why would that topic from this very forum not work (along with others I tried), but for mine it did?

Maybe this will be a mystery to be unsolved.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [22 ביולי,‏ 2025,‏ 5:35pm UTC](https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869/4 "2025-07-22T17:35:29Z")

</div>

> [@alltiagocom](#):
>
> I’m a bit confused about the image you shared…?

That’s the image URL to which you were referring in the OP.

> [@alltiagocom](#):
>
> But this doesn’t seem to be a Facebook issue, because on my own Discourse installation, some images are shown, so I would just like to know what’s the process to make them work?

The flow for this process is:

- User posts the topic URL to Facebook
- Facebook retrieves the topic URL and parses the opengraph tags
- Facebook identifies the og:image URL
- Facebook attempts to retrieve the og:image URL
  - Facebook resolves the URL’s hostname into an IP address
  - Facebook connects to the IP
  - Facebook retrieves the URL

If it’s trying to retrieve the URL `https://global.discourse-cdn.com/meta/optimized/4X/e/0/4/e04203d665f3ff3540361fdeedb76df8cf37df9b_2_1024x767.jpeg` but gives the error `Could not resolve the hostname into a valid IP address.` Discourse is not in the path for that step of the process. It’s Facebook’s servers trying to resolve an Amazon Cloudfront hostname.

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [22 ביולי,‏ 2025,‏ 6:51pm UTC](https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869/5 "2025-07-22T18:51:07Z")

</div>

> [@supermathie](#):
>
> That’s the image URL to which you were referring in the OP.

Ok, that makes sense now. Thank you.

> [@supermathie](#):
>
> Discourse is not in the path for that step of the process. It’s Facebook’s servers trying to resolve an Amazon Cloudfront hostname.

I was just wondering if something could be wrong with how Discourse was picking the images and setting the `og:image`. But yes, if my Discourse works (even though not 100% perfect), then maybe something is wrong with what you said.

So, my question still is: the image being picked is always the topmost image in the topic? Is it how Discourse it built? Or is it randomly picked? And are there any specific requirements for it to pick the image in terms of image dimensions, etc? Just want to make sure that when it comes to my own topics, if I want to include images, I format them properly.

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [22 ביולי,‏ 2025,‏ 9:01pm UTC](https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869/6 "2025-07-22T21:01:57Z")

</div>

> [@alltiagocom](#):
>
> So, my question still is: the image being picked is always the topmost image in the topic? Is it how Discourse it built? Or is it randomly picked? And are there any specific requirements for it to pick the image in terms of image dimensions, etc? Just want to make sure that when it comes to my own topics, if I want to include images, I format them properly.

May not be the best place for this brief documentation, but you can use a `|thumbnail` hint in your image Markdown to choose a different thumbnail:

> [@Topic List Thumbnails](https://meta.discourse.org/t/topic-list-thumbnails/150602/1):
>
> By default, Discourse will use the first image in the OP of the topic. If you would like to select a different image from the OP, add `|thumbnail` to the markdown. For example
> 
> ```plaintext
> ![alttext|100x100](upload://aaa)
> ![alttext|100x100|thumbnail](upload://bbb) << this one will be the thumbnail
> 
> ```

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [23 ביולי,‏ 2025,‏ 1:16pm UTC](https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869/7 "2025-07-23T13:16:13Z")

</div>

תודה רבה על הטיפ. לא ידעתי עליו.  
מה לגבי מידות התמונה? יש דרישות כלשהן? או שכל תמונה תתקבל, גם אם היא תתעוות עקב שינוי גודל?

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [23 ביולי,‏ 2025,‏ 3:46pm UTC](https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869/8 "2025-07-23T15:46:30Z")

</div>

> [@alltiagocom](#):
>
> How about image dimensions? Any requirements? Or any image will be used, even if it gets distorted by being resized?

I’m not sure, but I think any image can be used, and resizing is up to the consumer. For example, I just tested a small image on try, let’s see its Onebox:

[https://try.discourse.org/t/testing-some-images-and-thumbnails-hint/1498](https://try.discourse.org/t/testing-some-images-and-thumbnails-hint/1498)

> [@alltiagocom](#):
>
> EDIT: I just noticed that this is a component… so I have to install the component in order to decide which image will be used by OpenGraph? I’m a bit confused now, sorry.

It is a bit confusing indeed, the `|thumbnail` logic is all on core, the theme component just requests that core generates additional thumbnail sizes, and uses them on the topic list. It happened to be the only topic (that I know of) with that piece of information, hence the quote.

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [23 ביולי,‏ 2025,‏ 4:16pm UTC](https://meta.discourse.org/t/sharing-link-to-facebook-does-not-show-image-open-graph/374869/9 "2025-07-23T16:16:29Z")

</div>

> [@renato](#):
>
> I’m not sure, but I think any image can be used, and resizing is up to the consumer. For example, I just tested a small image on try, let’s see its Onebox:

When I tested on [Facebook Debugger](https://developers.facebook.com/tools/debug), I got some errors and no image is displayed

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/6/6/166a07a49b5e2c0f45e77092a0c70d45f745e63a.png)

> [@renato](#):
>
> It is a bit confusing indeed, the `|thumbnail` logic is all on core, the theme component just requests that core generates additional thumbnail sizes, and uses them on the topic list. It happened to be the only topic (that I know of) with that piece of information, hence the quote.

Thank you for clarifying. I am definitely installing this component, because it’s a feature I really want to use on some categories. I also checked a similar component, the [Topic Cards](https://meta.discourse.org/t/topic-cards/296048). This one seems to have its own strengths as well.
