# Issue with Onebox and Youtube

**URL:** <https://meta.discourse.org/t/issue-with-onebox-and-youtube/125969>\
**Category:** Bug\
**Tags:** onebox\
**Created:** [August 16, 2019, 10:41am UTC](https://meta.discourse.org/t/issue-with-onebox-and-youtube/125969 "2019-08-16T10:41:49Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)\
**Post date:** [August 19, 2019, 7:43pm UTC](https://meta.discourse.org/t/issue-with-onebox-and-youtube/125969/6 "2019-08-19T19:43:35Z")

</div>

I did some improvements here and created [this PR](https://github.com/discourse/discourse/pull/8019).

> [@merefield](#):
>
> `Topic.image_url` appears to be `nil`

I just tested v2.3.2 and it does not look like YouTube links set the `image_url` attribute of the topic. The reason is that the image is extracted from the `src` attribute of an `img`, but when a YouTube video is linked, there is a `<div>` with a `background-image` CSS attribute.

Are you sure `image_url` used to be set?

---

_[View the full topic](https://meta.discourse.org/t/issue-with-onebox-and-youtube/125969)._
