# Twitter Card image meta uses relative URL

**URL:** <https://meta.discourse.org/t/twitter-card-image-meta-uses-relative-url/50052>\
**Category:** Bug\
**Created:** [Septembre 13, 2016, 12:43 UTC](https://meta.discourse.org/t/twitter-card-image-meta-uses-relative-url/50052 "2016-09-13T00:43:24Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![DanielMarquard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danielmarquard/32/74010_2.png) [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)\
**Post date:** [Septembre 13, 2016, 12:43 UTC](https://meta.discourse.org/t/twitter-card-image-meta-uses-relative-url/50052/1 "2016-09-13T00:43:24Z")

</div>

Since I began using Discourse, the Twitter Card image meta URL has always used relative URLs for topics with uploaded images. I think Facebook can handle relative image URLs, but Twitter does not seem to like them, so no image is displayed in tweets.

I’ve been working around this by using absolute URLs for images in posts, which worked up until last week. Now, even if the post uses the absolute URL, the image’s relative URL is still used in the Twitter Card image meta tag. Like in [this topic](https://critcola.com/community/t/crit-cola-needs-strat-callers/147), for example.

I’ve tried setting `DISCOURSE_CDN_URL`, which didn’t seem to affect this tag. `DISCOURSE_RELATIVE_URL_ROOT` is set because we’re running in a subdir. If I remember correctly, when I tried changing this is to be an absolute URL, it broke the URL structure for many links.

Any idea how to address this?

---

_[View the full topic](https://meta.discourse.org/t/twitter-card-image-meta-uses-relative-url/50052)._
