The user ispazio reported an issue where images uploaded to their Discourse forum disappear after publishing, though they appear in the preview. After trying solutions like safe mode and disabling thumbnails, ispazio resolved the issue by adding CSS to force image display, but later discovered the root cause was their custom theme setting images to 0x0 pixels. lucasbasquerotto pointed out this likely caused the problem, and ispazio confirmed adjusting the theme settings fixed the issue without needing the CSS workaround.
Hi, i’ve a strange bug.
It seems i can’t display images in my Discourse forum.
when i add an image, the upload process goes fine, in the message preview i can see the image but as soon as i publish the message, the image disappear
i can’t see the image in the discussion. But if i hit “EDIT” i will see it again in the preview
Do you use an external provider for uploads (amazon s3) ?
If not, I have two guesses (but I’m usually bad at this): you added some css custom for cooked images and it affects uploads also you can try /safe-mode, deactivate plugins and theme et check if it works.
Or during the post processus, the forum generates an optimized image and it doesn’t work. You can try deactivating the create thumbnails setting and upload a new image (you can’t use the same, because of a caching magic that remembers this image). It will not create an optimized version and it might work.
Check the /logs page anyway, there might be some useful info
If that CSS solved the problem, it’s probably because the image is shown wih 0px by default. Are you using some custom theme, or have other custom CSS code that might be causing it?