A user, Clo, reports that images on their Discourse site are broken after migrating to DigitalOcean, even after re-uploading. Despite initial functionality, the issue persists, with both old and new images failing to display. The discussion suggests the problem may stem from the site still using Discourse’s Global CDN, which could have invalidated access after the account expired. Users recommend editing app.yml to disable the CDN and rebuilding Discourse, as well as rebaking posts to update image references. However, pfaffman notes that the issue might also involve the database still pointing to the old S3 bucket, requiring complex database updates. Additionally, new images not uploading indicates a separate installation issue. Clo confirms the backup was a .tar file, raising concerns about image inclusion in the backup.
I recently moved my site from Discourse to DigitalOcean. Everything looked great after the migration, but for the last few days all my images appear broken. I even tried to upload the images from scratch, but they’re still broken.
My logo initially also didn’t reflect, but I somehow managed to fix that by using a larger image, thank goodness.
I unfortunately don’t really have any dev background, so any advice on why this is happening and what I can do to fix this would really be appreciated!
You likely got a backup that was taken before they changed the setting to include the images in the backup. Was the file a .tar.gz or a .sql.gz?
I’ve had this issue in the past. It may still be possible to get them to make those files available either on their bucket or in a backup file of some sort. Getting it straightened out can be tricky.
It was a .tar file. The images showed fine initially, but now that you mention it I’m wondering if it started showing as broken once my Discourse account expired.
Then again, should it not be fixed then if I manually upload images to replace the old ones? Because even new images that I try to upload don’t want to work…
The database still references the images on the Discourse S3 bucket/CDN, so putting them in local storage is not enough. The database needs to be updated to point to the local storage. There are some topics about how to do that, but it’s fairly involved and requires some understanding of Rails and how the images are stored. If you have a budget you can ask in Marketplace or contact me.
If new images aren’t working then you have a problem with your installation that is separate from the problem discussed above.