Broken images inside posts

Hello,

I’m trying to setup a Discourse instance (private) on a Digitalocean droplet and I’m having some problems with the uploaded images, because they are not showing in the posts.

The weird thing is that right after insert the image, when it finished to upload you can see for a second. After that, the link breaks and you can’t see it anymore. I have tried to rebuild the HTML and it didn’t work, the same thing happens: you can see the image for a second after rebuilding only. An example:

The same thing is happening with the assets uploaded to customize the look of the forum. When I upload a new logo the image is broken inside the post but, as you can see in this other screenshot, I can use it to customize the header.

This one is showing the 404 error that I get for the images. I know he images are in the server because if I go to the dir:

/var/discourse/shared/standalone/uploads/default/original/1X/

I can see every single image file there.

After some reading here in Meta about similar problems (here and here) I check my app.yml and the hostname line looks fine (no http:// in front of the domain name)

DISCOURSE_HOSTNAME: ‘bacter.io

Also, I’m not sure if this can be of some relevance, I have the Discourse forum hosted in a subdomain following the instructions in this guide:

Running other websites on the same machine as Discourse

I would love if somebody can point me to the right direction (I can’t find any other related post here in Meta) so I can do some further investigation and solve the problem.

Thanks!

Tested in Chromium and Firefox on LInux and Firefox on Android.
Discourse version (Docker install): 1.5.0.beta 3 +46


P.S: I hope you can excuse the possible grammar mistakes in my post, english is not my first language.

1 Like

Just because of curiosity:

  • Are you sure that you’re using the forum’s subdomain as the DISCOURSE_HOSTNAME?
  • Are you sure you’re not hosting the forums over HTTPS?
2 Likes

Is http://bacter.io/t/assets-for-the-site-design/1234 the address that you loaded the page over?

1 Like

@KazWolfe

No HTTPS, but you were right about the missing subdomain in DISCOURSE HOSTNAME.

Changed it, rebuild the app and rebuild the HTML for each one of the missing images and now works fine (obviously)

I leave this here as a testament of my stupidity and hoping it can helps somebody else.

Thanks!

@riking : Solved, but thanks for your interest.

4 Likes