# Category Background images retain after being deleted

**URL:** https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377
**Category:** Bug
**Created:** [1 במרץ,‏ 2016,‏ 9:08am UTC](https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377 "2016-03-01T09:08:53Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [1 במרץ,‏ 2016,‏ 9:08am UTC](https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377/1 "2016-03-01T09:08:53Z")

</div>

How to Repo

1. Insert a category background image (possibile more than 1000px in size)
2. Save.
3. Ctrl + F5
4. Go to the category you added the image and delete it, Click Save. Ctrl + F5 . The background image is still there!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1 במרץ,‏ 2016,‏ 11:03am UTC](https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377/2 "2016-03-01T11:03:07Z")

</div>

Can you repro this @techapj?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [1 במרץ,‏ 2016,‏ 12:33pm UTC](https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377/3 "2016-03-01T12:33:30Z")

</div>

I had to do “hard refresh” to clear category background image (after deleting category image).. Looking more into it.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [1 במרץ,‏ 2016,‏ 3:28pm UTC](https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377/4 "2016-03-01T15:28:10Z")

</div>

I sent a PR to fix this issue:

[https://github.com/discourse/discourse/pull/4052](https://github.com/discourse/discourse/pull/4052)

I will let @zogstrip review the PR since he is familiar with this code. 🙂

---

<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: [1 במרץ,‏ 2016,‏ 3:39pm UTC](https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377/5 "2016-03-01T15:39:32Z")

</div>

Hmm, I actually can’t reproduce this issue. I just tried on try and it worked just fine.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [1 במרץ,‏ 2016,‏ 4:01pm UTC](https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377/6 "2016-03-01T16:01:28Z")

</div>

Yes, I am not able to repro this on try too. But I can repro this consistently on my local dev instance.. 😕

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [1 במרץ,‏ 2016,‏ 4:24pm UTC](https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377/7 "2016-03-01T16:24:47Z")

</div>

Weird, I can’t even repro this on a regular DO hosted instance.

@Alankrit_Choudh on which instance are you getting this issue? And are you able to repro this consistently?

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [1 במרץ,‏ 2016,‏ 5:49pm UTC](https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377/8 "2016-03-01T17:49:37Z")

</div>

Well, it lasted for a while, is it possible that this could be happening via Cache from Cloudflare? Happened only once as of now. After that didn’t take the risk of following it on a live production.  
I have my instance on DO - [https://animeforums.me](https://animeforums.me)

Edit i removed the backgrounds from the category. After that, i have not attempted this repro.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1 במרץ,‏ 2016,‏ 7:06pm UTC](https://meta.discourse.org/t/category-background-images-retain-after-being-deleted/40377/9 "2016-03-01T19:06:16Z")

</div>


