Uploading pictures stuck at 100%

I can’t seem to upload any picture to my forum. It gets stuck at 100%.

Avatar image:

Image in post:

There is no S3 or any other external storage involved.

I have checked:

*Discourse error log: nothing

  • NGINX error.log: nothing
  • MYSQL error.log (if that has anything to do with anything at all): nothing

Can you upload pictures here or to try.discourse.org? How big is the picture?

As you can see in the OP, uploading pictures here works.

The pictures I tried to upload to my site were 108kB and 79.6 kB

I saw another topic recently here where you failed to upload an image though. I specifically remember because it was annoying, you had the word “uploading…” actually posted in the topic.

Also did you mean Postgres when you said MySQL, above? MySQL has nothing to do with Discourse…

Yes, I had problems uploading to meta the other day. Not sure if the problem just went away or if it’s because I’m on a different computer now.

Yes, I was suspecting that MySQL has nothing to do with Discourse. I was just looking through my /var/log folder in search for a log-file that might give me a hint. I did not look inside the container because I don’t know how to do that.

How can I trouble shoot this?

I just disabled all my browser plugins and restarted the browser, but to no avail.

This was fixed about a week ago.

Might be an issue with your image. Any chances you could upload it some places which doesn’t optimize images and link it here?

1 Like

I appreciate your help. After a couple of rebuilts, the problem seems to have gone away. I can now upload both of the images that I originally tested Let’s hope it is solved for good.

But could you specify what the limitations are for uploaded images, i.e. what kind of images will cause problems with the image optimization?

And, of course, it would be great if the optimizer/uploader could throw an error rather than being stuck for ever…

There should be none apart from respecting the size/dimension constraints.

I’m not able to reproduce the issue… which is tremendously helpful in fixing the issue :wink:

I know, I was thinking of an algorithm where the uploader itself notices that something is not working and stops trying. A simple one would be a timer (e.g. if upload is not completed after 20 sec, it produces an error), but that may be too simple given that upload should also work with slow internet connections. Anyway, it was just a thought.

I had the same problem. It was a long polling configuration problem. Check that out.


What configuration did you change to fix the issue?

Howdy @tmm1 :smile:

Are you still on local storage or s3? Are uploads generally working in posts? Can you try with a different image.

And last but not least, you are going to need a new base docker image for new image magick stuff, so try:

cd /var/discourse
./launcher rebuild app

Hi Sam.

I’m storing to s3. It’s never worked reliably. I’m still on discourse 1.8, and it looks like there have been several related fixes recently (including MessageBus short polling is not working).

After upgrading to discourse 2.0 I’m seeing an error about converting png to jpg, so I’m guessing my imagemagick is out of date. What are the imagemagick requirements? (I’m not using docker; have a discourse fork running on heroku with a custom buildpack which currently installs ImageMagick 6.9.5)


You can’t be on Discourse 1.8, you’re vulnerable to many exploits… you need to update to 2.1 ASAP.


You are in for a big world of pain here, we have so many little dependencies to worry about, see:


Our current image magick version is 7.0.8-6 but this changes quite a lot.

Highly recommend you just shift to a Docker based setup to kill a lot of your headaches here.


Everything is working after I upgraded to Discourse 2.1 and ImageMagick 7.0.8-11. Thanks for the help!