# Very small PNGs are inappropriately converted to JPGs

**URL:** https://meta.discourse.org/t/very-small-pngs-are-inappropriately-converted-to-jpgs/102365
**Category:** Bug
**Created:** [20 november 2018 om 05:14 UTC](https://meta.discourse.org/t/very-small-pngs-are-inappropriately-converted-to-jpgs/102365 "2018-11-20T05:14:23Z")
**Posts on this page:** 4
**Page:** 2

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [21 november 2018 om 00:03 UTC](https://meta.discourse.org/t/very-small-pngs-are-inappropriately-converted-to-jpgs/102365/23 "2018-11-21T00:03:22Z")

</div>

Completed per:

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

Note recovering here is a bit tricky. After you get the commit deployed you are going to have to either:

- Change 1 byte of data in your png

OR

- Enter your container hunt the upload and destroy it

When you upload a file we tie the SHA1 hash of the upload with all the previous processes, so you can not force old uploads through the new pipeline.

---

<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: [21 november 2018 om 00:08 UTC](https://meta.discourse.org/t/very-small-pngs-are-inappropriately-converted-to-jpgs/102365/24 "2018-11-21T00:08:21Z")

</div>

Ok so grab latest @robbyoconnor and give it a whirl. Good find, this was indeed an edge case in our upload code!

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [23 november 2018 om 03:41 UTC](https://meta.discourse.org/t/very-small-pngs-are-inappropriately-converted-to-jpgs/102365/27 "2018-11-23T03:41:39Z")

</div>

This resolves the bug.

Thank you so much!!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [23 november 2018 om 04:00 UTC](https://meta.discourse.org/t/very-small-pngs-are-inappropriately-converted-to-jpgs/102365/28 "2018-11-23T04:00:10Z")

</div>



[Vorige pagina](https://meta.discourse.org/t/very-small-pngs-are-inappropriately-converted-to-jpgs/102365.md?page=1)
