# Onebox משתמש ב-URL שגוי עבור ה-favicon בתצוגה המקדימה של הקישור

**URL:** https://meta.discourse.org/t/onebox-uses-wrong-url-for-the-favicon-in-link-preview/217074
**Category:** Bug
**Created:** [4 בפברואר,‏ 2022,‏ 11:57am UTC](https://meta.discourse.org/t/onebox-uses-wrong-url-for-the-favicon-in-link-preview/217074 "2022-02-04T11:57:38Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![JoshuaH](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joshuah/32/209433_2.png) [@JoshuaH](https://meta.discourse.org/u/JoshuaH)
#### Post date: [4 בפברואר,‏ 2022,‏ 11:57am UTC](https://meta.discourse.org/t/onebox-uses-wrong-url-for-the-favicon-in-link-preview/217074/1 "2022-02-04T11:57:38Z")

</div>

I noticed the favicons are broken for some of our websites in the onebox preview of a link.

For example:

On this website ([https://invantive.com/products/invantive-control-for-excel.html](https://invantive.com/products/invantive-control-for-excel.html)) the favicon URL is:

`<link rel="shortcut icon" href="https://invantive.com/favicon.ico">`

But the broken favicon in the preview shows the following favicon URL:

`<img src="https://invantive.com/products/invantive-control-for-excel.html/favicon.ico" class="site-icon">`

It seems to simply take the link URL and adding ‘/favicon.ico’ to the end of that path.

Any idea how to fix this?

Joshua

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [4 בפברואר,‏ 2022,‏ 12:15pm UTC](https://meta.discourse.org/t/onebox-uses-wrong-url-for-the-favicon-in-link-preview/217074/2 "2022-02-04T12:15:33Z")

</div>

It looks to me like its working

`https://invantive.com/products/invantive-control-for-excel.html`  
[https://invantive.com/products/invantive-control-for-excel.html](https://invantive.com/products/invantive-control-for-excel.html)

`https://invantive.com/`  
[https://invantive.com/](https://invantive.com/)

---

<div class="post-metadata">

### Author: ![JoshuaH](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joshuah/32/209433_2.png) [@JoshuaH](https://meta.discourse.org/u/JoshuaH)
#### Post date: [4 בפברואר,‏ 2022,‏ 12:21pm UTC](https://meta.discourse.org/t/onebox-uses-wrong-url-for-the-favicon-in-link-preview/217074/3 "2022-02-04T12:21:29Z")

</div>

As you can see in the first preview, there is no favicon, since onebox created it’s own URL.

Your example looks like this one my machine, so no favicon:

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/0/d04487d416407bad730df05bda1c1d8f0eb0a532.png)

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [4 בפברואר,‏ 2022,‏ 12:23pm UTC](https://meta.discourse.org/t/onebox-uses-wrong-url-for-the-favicon-in-link-preview/217074/4 "2022-02-04T12:23:37Z")

</div>

onebox takes the `og:image`

---

<div class="post-metadata">

### Author: ![JoshuaH](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joshuah/32/209433_2.png) [@JoshuaH](https://meta.discourse.org/u/JoshuaH)
#### Post date: [4 בפברואר,‏ 2022,‏ 12:28pm UTC](https://meta.discourse.org/t/onebox-uses-wrong-url-for-the-favicon-in-link-preview/217074/5 "2022-02-04T12:28:58Z")

</div>

But it uses the favicon as the little image next to the title:

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

This works for [invantive.com](http://invantive.com), since it takes that URL and adds ‘/favicon.ico’ to the URL, which is the correct URL.

However for the other example, it creates the favicon URL by using the link URL and adding ‘/favicon.ico’, which isn’t the favicon URL used on that page (it’s `'https://invantive.com/favicon.ico'` on that page too) and thus creating a broken image.

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [4 בפברואר,‏ 2022,‏ 12:31pm UTC](https://meta.discourse.org/t/onebox-uses-wrong-url-for-the-favicon-in-link-preview/217074/6 "2022-02-04T12:31:06Z")

</div>

Oh, now i see what you mean

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/f/bfc3dd54b85d6dd9d8a23c696a420797897cb9c3.png)

---

<div class="post-metadata">

### Author: ![JoshuaH](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joshuah/32/209433_2.png) [@JoshuaH](https://meta.discourse.org/u/JoshuaH)
#### Post date: [4 בפברואר,‏ 2022,‏ 12:34pm UTC](https://meta.discourse.org/t/onebox-uses-wrong-url-for-the-favicon-in-link-preview/217074/7 "2022-02-04T12:34:19Z")

</div>

Correct!

But strangely enough, it seems in your preview it doesn’t show the broken image anymore, but no image at all, not sure why it chose to entirely ignore the favicon.

Happened just a few minutes after my screenshot, where you can see there’s a missing image (there’s some empty space before the title in my screenshot).
