# S3 with CDN image link broken on user card and profile background

**URL:** <https://meta.discourse.org/t/s3-with-cdn-image-link-broken-on-user-card-and-profile-background/29286>\
**Category:** Bug\
**Tags:** uploads, cdn\
**Created:** [2015 年5 月 27 日 01:13 UTC](https://meta.discourse.org/t/s3-with-cdn-image-link-broken-on-user-card-and-profile-background/29286 "2015-05-27T01:13:40Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![wub](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wub/32/42488_2.png) [@wub](https://meta.discourse.org/u/wub)\
发布日期： [2015 年5 月 27 日 01:13 UTC](https://meta.discourse.org/t/s3-with-cdn-image-link-broken-on-user-card-and-profile-background/29286/1 "2015-05-27T01:13:40Z")

</div>

On my site (let’s say `foo.com`), I have a “Discourse CDN” set up (`cdn.foo.com`) to serve JS/CSS. Uploads to S3 are also enabled, and the S3 CDN is `storage.foo.com`. My raw S3 bucket is `foo.s3.amazonaws.com`.

On the user profile image, the S3 cdn gets appended to the Discourse CDN: `//cdn.foo.com//storage.foo.com/xxxxx.jpg`

The user _card_ image, on my site appends raw S3 bucket to the Discourse CDN: `//cdn.foo.com//foo.s3.amazonaws.com/xxxxx.jpg`

I’ve tried rebakes etc., is there anything else I need to do, or is this a bug?

[This commit](https://github.com/discourse/discourse/commit/6a68e8c27284b542e344ea3b1a8d81311b62e39c) might be related.

---

_[View the full topic](https://meta.discourse.org/t/s3-with-cdn-image-link-broken-on-user-card-and-profile-background/29286)._
