PNG's a no show

Unless you can repro the binary image issue here, I am not sure how much we can help.

Ok, since you know more about Discourse than I do, could you suggest points along the process where this problem might occur? If you don’t mind, could you walk through the process with me:

  1. File upload/storage: The files are uploaded properly, they exist and there are no errors in the files, they can be accessed manually, etc.
  2. File retrieval: Which Discourse processes retrieve these files? Which log settings could issue error messages about image file retrieval?
  3. File display: Which Discourse processes display the files? Which log settings could issue error messages about image file display?
1 Like

I think before any of this, can you confirm you are using our official installer? Are you using s3 uploads or standard uploads? Have you ran:

cd /var/discourse
git pull
./launcher rebuild app

Hi @sam, thanks for the suggestion, last night I updated last week’s release via terminal window (cd /var/discourse, git pull, .launcher rebuild app) and the problem still exists. We don’t use Amazon s3 storage.

I don’t have any explanations for your problem, but note that you can paste images directly into the composer. You don’t need to first paste into some other application to create and image to then upload.

Got the message that docker version not supported
Installed docker-ce, now is my forum gone?

After running the latest Discourse update a few days ago, clicking the the download icon opens .txt files in a browser instead of downloading them, yet no Discourse settings were changed. Yet now .png files are displaying properly. So a deeper problem is occuring.

I implemented the Discourse/Docker periodic manual full update instructions and watched error messages.

All updates .launcher rebuild app I received an error message that docker 17.05 is not supported, minimum required is 17.06.02. Ubuntu has changed the package name from docker-engine to docker-ce. Is it safe to install docker-ce, as this won’t be an upgrade? Because of the docker version preventing app rebuild, my forum is down. :frowning: What do?

Yes docker ce is what you want to use


Hi @Sam,
Yeah I installed docker-ce, per How Do I upgrade Docker - Ask Ubuntu and

Then ran .launcher rebuild app, which initiated a download of the base Discourse image.
I stopped it, figured this would wipe out my forum files.
Should I let this run?

I see a big black square in both the browser and inkscape which matches the source:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape ( -->
<svg xmlns:dc="" xmlns:cc="" xmlns:rdf="" xmlns:svg="" xmlns="" xmlns:xlink="" xmlns:sodipodi="" xmlns:inkscape="" id="svg4206" version="1.1" inkscape:version="0.91 r" width="500" height="377.5" viewBox="0 0 500 377.5" sodipodi:docname="Logo-400.svg">

  <defs id="defs4210"/>

  <g id="g4218">
    <rect y="-53.42" x="-40.32" height="466.8" width="589.4" id="rect4216" style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3.6222;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"/>


I don’t actually see an image in this file, just a white background. if you still have the original can you check to see if the contents have changed? I see:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape ( -->
<svg xmlns:dc="" xmlns:cc="" xmlns:rdf="" xmlns:svg="" xmlns="" xmlns:xlink="" xmlns:sodipodi="" xmlns:inkscape="" width="320.9mm" height="352.2mm" viewBox="0 0 320.9 352.2" version="1.1" id="svg8" inkscape:version="0.92.2 (unknown)" sodipodi:docname="FTB_EpicMode.svg">
  <defs id="defs2"/>

  <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(44.79,25)">

    <rect style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.3;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.265;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" id="rect944" width="321" height="352.2" x="-44.79" y="-25"/>

Yes. Your forum files are safe in /var/discourse/shared/standalone.

It is best not to muddy the waters even further at this point. Svg gets downgraded a lot if the text content is on our unsafe blacklists. Focus on pngs first.


Thanks @Jay!   

SVG images are run through an XML whitelist, any non-approved elements are removed.


What Jay said above – yes it’s absolutely safe.

If you wanted a detailed explanation: The Docker image hosts the software (ruby, the code, postgres, etc) that your forum runs on. Discourse stores your data outside the image, so these images are safe to be shut down and upgraded when there’s a new version out. Your data (forum posts, users, site settings) will be restored when it restarts, and that will be mounted onto the new base image.


ok the forum’s back, the latest Discourse & Docker versions are installed.

But we’re still getting the new improved problem, where .pngs are visible yet trying to download .txt files (and other non-image files) to be displayed in a browser - we’re not getting the download/save window dialog (This change happened when the latest Discourse update was installed a few days ago). See this post on our forum:

File sharing is really important in providing support to our user community.
Any thoughts on what could cause this?

OK after all that…we still have the problem that attachments are acting weird.

  1. pngs weren’t displaying

  2. After this week’s update the .pngs are displaying properly. But now downloads don’t work. Text files are opened in a browser tab like they’re an image file.

This is a known bug. Spoke with engineering and it is believed to be the same issue as Upload file name not kept on download.


Thanks @joshua. But How can this be a bug if .zip & .pdf files are downloaded correctly, but others aren’t? The download and display functions are working, the choice of whether to download or display the selected file is what’s a bit muddled.

Is there some method in the code which selects how to process each file type when the download icon is selected?
Can I get to it and make a custom change for our pattern & measurement & text files?

This post has links to each type of file, good for testing:

Your Discourse is a month old. Can you update to latest? Your downloading issues should be fixed.


Sorry for the delay, it was a Rails 5.x upgrade issue that took a while to work out.

1 Like