# Problem with category image transparency

**URL:** https://meta.discourse.org/t/problem-with-category-image-transparency/124389
**Category:** Support
**Created:** [July 30, 2019, 10:29am UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389 "2019-07-30T10:29:58Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![eextra](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eextra/32/170266_2.png) [@eextra](https://meta.discourse.org/u/eextra)
#### Post date: [July 30, 2019, 10:29am UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/1 "2019-07-30T10:29:58Z")

</div>

I can’t understand it, I’m creating icon in Gimp. Adds transparency.

Windows and other programs have a good interpretation, but on the forum a white background is added to the image.

6 hours I get tired of it. What am I doing wrong ?..

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [July 30, 2019, 11:17am UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/2 "2019-07-30T11:17:14Z")

</div>

Do you know if the image is a PNG or a JPG file after it has been uploaded? My guess is that it’s being converted to a JPG which will remove the transparency. If that’s the case, here’s what you can try:

> [@PNG converted to JPG? frowning](https://meta.discourse.org/t/png-converted-to-jpg/74438/2):
>
> Set the “png to jpg quality” site setting to 100 to disable that behavior wink

You can also read more about the conversion behavior here: [Very small PNGs are inappropriately converted to JPGs - #23 by sam](https://meta.discourse.org/t/very-small-pngs-are-inappropriately-converted-to-jpgs/102365/23)

---

<div class="post-metadata">

### Author: ![eextra](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eextra/32/170266_2.png) [@eextra](https://meta.discourse.org/u/eextra)
#### Post date: [July 30, 2019, 11:54am UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/3 "2019-07-30T11:54:32Z")

</div>

Okay, I’ll check it out, but tell me why it’s happening. What is the intention of such conversion?

btw  
I tried with many pictures, even loaded very large ones on the whole screen and the problem still existed.

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [July 30, 2019, 10:44pm UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/4 "2019-07-30T22:44:53Z")

</div>

The idea is to cut down the file size whenever possible to reduce the impact on any storage limits.

Have you tried uploading an image with transparency after changing the setting I mentioned? If you are using the same image, it’s possible you may need to alter a pixel so the system does not see it as a duplicate and keep the converted version in favor of the PNG version (this was mentioned in the [link](https://meta.discourse.org/t/very-small-pngs-are-inappropriately-converted-to-jpgs/102365/23) I shared)

---

<div class="post-metadata">

### Author: ![Quddus](https://avatars.discourse-cdn.com/v4/letter/q/9d8465/32.png) [@Quddus](https://meta.discourse.org/u/Quddus)
#### Post date: [December 7, 2020, 3:48am UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/6 "2020-12-07T03:48:30Z")

</div>

Hi, I’ve set the png to jpg setting to 100 and edited the new version and I’m still getting converted to jpg. Any suggestions?

---

<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: [December 7, 2020, 4:44am UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/7 "2020-12-07T04:44:14Z")

</div>

I’m not sure, I think @jamie.wilson worked on this recently? The settings should allow control over the conversion.

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [December 7, 2020, 2:27pm UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/8 "2020-12-07T14:27:11Z")

</div>

In my experience with Gimp you have to set the export settings as such:

 ![Screenshot from 2020-12-07 14-25-04](https://global.discourse-cdn.com/meta/original/3X/a/b/abb6a07f4450adaa165a2b4ce7861972dfd59ca5.png)

- Disable “Save background color”
- Enable “Save gamma”

---

<div class="post-metadata">

### Author: ![Quddus](https://avatars.discourse-cdn.com/v4/letter/q/9d8465/32.png) [@Quddus](https://meta.discourse.org/u/Quddus)
#### Post date: [December 7, 2020, 2:32pm UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/9 "2020-12-07T14:32:28Z")

</div>

Yes, the transparency is intact when I upload the png. The issue is that the file is still be turned into a jpg, which do not support transparency.

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [December 7, 2020, 2:53pm UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/10 "2020-12-07T14:53:15Z")

</div>

Yes, in other programs. But if the file has a background property, it will be converted to jpg. If you disable the background, then not. That’s just my experience.

Edit: actually, no. I had this problem with transparencies, but can’t reproduce it now. Just always works 🤷‍♂️

---

<div class="post-metadata">

### Author: ![jamie.wilson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamie.wilson/32/185466_2.png) [@jamie.wilson](https://meta.discourse.org/u/jamie.wilson)
#### Post date: [February 12, 2021, 6:43pm UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/12 "2021-02-12T18:43:18Z")

</div>

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

I identified a situation where pngs would be converted to jpegs even when `png_to_jpg_quality` was set to 100, and merged in a fix just now. Hopefully this addresses the problem you had encountered.

Can you update your Discourse instance and let us know if the problem has been resolved?

---

<div class="post-metadata">

### Author: ![Quddus](https://avatars.discourse-cdn.com/v4/letter/q/9d8465/32.png) [@Quddus](https://meta.discourse.org/u/Quddus)
#### Post date: [March 5, 2021, 8:44pm UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/13 "2021-03-05T20:44:09Z")

</div>

Yes, it works great now! Sorry for the delayed response.

Thanks 😆

---

<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: [March 5, 2021, 8:58pm UTC](https://meta.discourse.org/t/problem-with-category-image-transparency/124389/14 "2021-03-05T20:58:11Z")

</div>


