Broken images in production after importing backup


(Alex Armstrong) #1

I am migrating a community from another forum software. I did the import on a local Vagrant instance, as recommended. But now that I’ve uploaded the database on my production site (in Docker) all the images are broken because their URLs are of this form:

//localhost:3000/uploads/default/optimized/1X/7f141a017abb4d79fa88f2a47472197bfe7e2f6d_1_511x500.jpg

Is there a way to “search and replace” or otherwise correct the image URLs in bulk? :sweat:


Ning import script
(Alex Armstrong) #2

Figured it out. I had to rebake the posts in order to correct the image paths:

I would be more frustrated, but for some reason the phrase “rebake the posts” makes me happy :smiley: