After server migration the images in posts aren't downloadable anymore

I successfully migrated Discourse to another server and the only issue is that the uploaded images in posts that were in the backup image are downloadable and viewable as a larger one.

Images that were uploaded in posts after the migration are smaller and not downloadable. download_remote_images_to_local is active.
What am I overlooking?

My guess is that the forum has to rebake all posts for the images to be correctly displayed.

You can have a look at sidekiq to see if there are related tasks running ; if not, try to rebuild a post HTML and see if it “repairs” the post images?

3 Likes

I tried that and even flushed the sidekiq queue, but it all stays the same.

I only encountered this symptom when migrating a forum, before the posts were baked. I have no idea then. :pensive:

1 Like

It’s okay, thank you for responding, though. I appreciate the effort.

@Bryanpwo, I’m no expert, but maybe I can take a quick look if you want to. I’d need temporary admin access to your forum for that.

Could this be the hotlink setting that was affecting you as well?

Nope. I see what I have done. I conflated two of your recent topics into brain-mush. :slightly_smiling_face:

1 Like

He stated that “download_remote_images_to_local is active.” so I guess this is not the issue. But maybe he ran out a bit of disk space during an automatic rebake of all posts or something like this? :man_shrugging:

1 Like

It’s not the disk space, there’s plenty of it. (The VM it is running in still has around 300GB free) I am running baking uncooked posts to see if it solves the issue. I think it is done by tomorrow. It has to rebake 42512 posts.

But the issue is with new posts from after the migration.

1 Like

I took a look at @Bryanpwo’s forum and couldn’t see any obvious reason for which the Lightbox wouldn’t work.

The issue is acknowledged though:

Several users were able to fix this issue, but it seems there is an array of possible causes.

https://meta.discourse.org/search?q=lightbox%20not%20working

I couldn’t do more than suggest a restore on a fresh, standard install without any custom settings, plugins, themes, or theme components.

2 Likes

Hi Brian!

Agreed; you said migrated posts are fine so I wouldn’t worry about rebaking or the like. This seems to be an issue with the post-migration configuration.

Are you using an external asset host like S3 or some other object storage API?

Is the site public by any chance, so that we might look at how the posts are rendered?

Failing that, could you paste the raw and cooked fields (inside triple backtick quotes) for a new post that exhibits the issue?

4 Likes

First of all, thank you for trying to help out. You lost me there, how do I provide you with such info?

The3 site is public, the address is:

1 Like

Great - that’s useful.

The issue is that the lightbox is not being applied for your new uploads.

Here is a post that shows the issue: What games are you playing? - #948 by NX-01 - Gaming - EndeavourOS

Could you go into that post’s wrench icon then do Rebuild HTML? That way we can rule out rebaking (or not).

1 Like

Great to see you were able to look at it.

I just rebuild that post with HTML, it didn’t change a thing. I forgot to tell you, but I did try that option in other posts the past few days.
All images until May this year are Lightboxed, after that none of them are, including newly created posts. Before the migration (last week) every image was in Lightbox.

1 Like

The easiest way is using the data explorer plugin.
You can create a SQL query such as:

SELECT raw, cooked from posts
where raw like '%text from the post%'

And it returns these fields’ content:

It’s a great tool to explore data (:sweat_smile:) and try to debug stuff sometimes.

2 Likes

Alright, that rules out issues that a rebake would fix, so the good news is that this is easily reproducible and likely a configuration problem.

Can you post the values of these site settings?

  • max image width
  • max image height

Have you overridden any other image related settings?

1 Like

max image width: 690
max image height: 500

1 Like

I didn’t touch the settings at all after migration, except for enabling the restore function.

1 Like