# Category background image returns 404

**URL:** https://meta.discourse.org/t/category-background-image-returns-404/63138
**Category:** Bug
**Created:** [May 22, 2017, 12:46pm UTC](https://meta.discourse.org/t/category-background-image-returns-404/63138 "2017-05-22T12:46:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Mooash](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mooash/32/189167_2.png) [@Mooash](https://meta.discourse.org/u/Mooash)
#### Post date: [May 22, 2017, 12:46pm UTC](https://meta.discourse.org/t/category-background-image-returns-404/63138/1 "2017-05-22T12:46:37Z")

</div>

When I upload a background image to a category the image uploads fine and appears in the category setting page however when viewing the category the link to the URL get munged into a URL that doesn’t exist. eg:

```plaintext
https://cdn.example.com/origin//<bucket>.s3.amazonaws.com/s3/original/1X/43f2764bab2004bd4b32bba411e4d9af97c964ff.jpeg

```

When it should just be:

```plaintext
https://cdn.example.com/s3/original/1X/43f2764bab2004bd4b32bba411e4d9af97c964ff.jpeg

```

For context I am using S3 for uploads and an S3 CDN. I am on Discourse version v1.8.0.beta12 +89.

### Steps to re produce

1. Upload a category image
2. View catgory with browser console open
3. See 404 appear with weird URL path

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 22, 2017, 2:28pm UTC](https://meta.discourse.org/t/category-background-image-returns-404/63138/3 "2017-05-22T14:28:13Z")

</div>

Have images worked at all since you enabled `s3 cdn url`?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 22, 2017, 4:37pm UTC](https://meta.discourse.org/t/category-background-image-returns-404/63138/4 "2017-05-22T16:37:27Z")

</div>

I just pushed a fix 🍓

[https://github.com/discourse/discourse/commit/a7f337fa93fe8f39ea3014a4593994e046abd434](https://github.com/discourse/discourse/commit/a7f337fa93fe8f39ea3014a4593994e046abd434)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 23, 2017, 4:00pm UTC](https://meta.discourse.org/t/category-background-image-returns-404/63138/5 "2017-05-23T16:00:27Z")

</div>

This topic was automatically closed after 23 hours. New replies are no longer allowed.
