# PNG silent upload fail on jpg conversion

**URL:** <https://meta.discourse.org/t/png-silent-upload-fail-on-jpg-conversion/75291>\
**Category:** Bug\
**Created:** [3 ديسمبر 2017، 8:00م UTC](https://meta.discourse.org/t/png-silent-upload-fail-on-jpg-conversion/75291 "2017-12-03T20:00:46Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![fearlessfrog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fearlessfrog/32/119653_2.png) [@fearlessfrog](https://meta.discourse.org/u/fearlessfrog)\
**Post date:** [3 ديسمبر 2017، 8:00م UTC](https://meta.discourse.org/t/png-silent-upload-fail-on-jpg-conversion/75291/1 "2017-12-03T20:00:46Z")

</div>

Hi!

We’ve had quite a few reports on PNG’s failing image uploads on our install at v1.9.0.beta15 +27. It seems to only be certain PNG’s and not just based on size. It is particularly unfortunate for us because it now fails on the screenshots of a game the forum is based on, so many users are finding the issue. It has only recently started to happen (my guess would be around the Rails 5 or so update for 1.9, but not sure).

I’ve recreated a test case on [try.discourse.com](http://try.discourse.com) and will try to recreate here.

A test image can be found in here:

[https://mudspikefiles.s3.amazonaws.com/PNG\_problem.zip](https://mudspikefiles.s3.amazonaws.com/PNG_problem.zip)

The error log we see seems to indicate it is related to the conversion to JPG:

```
/var/www/discourse/lib/discourse.rb:27:in `execute_command'
/var/www/discourse/lib/upload_creator.rb:137:in `convert_to_jpeg!'
/var/www/discourse/lib/upload_creator.rb:44:in `block in create_for'
/var/www/discourse/lib/distributed_mutex.rb:21:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:5:in `synchronize'
/var/www/discourse/lib/upload_creator.rb:36:in `create_for'
/var/www/discourse/app/controllers/uploads_controller.rb:116:in `create_upload'
/var/www/discourse/app/controllers/uploads_controller.rb:29:in `block in create'
/var/www/discourse/lib/hijack.rb:43:in `instance_eval'
/var/www/discourse/lib/hijack.rb:43:in `block in hijack'
/var/www/discourse/lib/scheduler/defer.rb:74:in `block in do_work'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rails_multisite-1.1.2/lib/rails_multisite/connection_management.rb:77:in `with_connection'
/var/www/discourse/lib/scheduler/defer.rb:72:in `do_work'
/var/www/discourse/lib/scheduler/defer.rb:61:in `block (2 levels) in start_thread'

```

Here is a working PNG:

 ![test](https://global.discourse-cdn.com/meta/original/3X/d/d/dd9506e1687ad316e4d1266c38ac91d9d51b93dc.png)

Here is the non-working PNG (you should have the error now in your logs):

Thanks for any help, plus let us know if there is any more info I can provide.

---

_[View the full topic](https://meta.discourse.org/t/png-silent-upload-fail-on-jpg-conversion/75291)._
