# Broken images in production after importing backup

**URL:** https://meta.discourse.org/t/broken-images-in-production-after-importing-backup/41200
**Category:** Support
**Created:** [March 17, 2016, 2:51pm UTC](https://meta.discourse.org/t/broken-images-in-production-after-importing-backup/41200 "2016-03-17T14:51:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alehandrof](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alehandrof/32/119526_2.png) [@alehandrof](https://meta.discourse.org/u/alehandrof)
#### Post date: [March 17, 2016, 2:51pm UTC](https://meta.discourse.org/t/broken-images-in-production-after-importing-backup/41200/1 "2016-03-17T14:51:19Z")

</div>

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:

```plaintext
//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? 😓

---

<div class="post-metadata">

### Author: ![alehandrof](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alehandrof/32/119526_2.png) [@alehandrof](https://meta.discourse.org/u/alehandrof)
#### Post date: [March 17, 2016, 4:54pm UTC](https://meta.discourse.org/t/broken-images-in-production-after-importing-backup/41200/2 "2016-03-17T16:54:50Z")

</div>

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

[https://meta.discourse.org/t/how-to-re-generate-all-topics/24142/2](https://meta.discourse.org/t/how-to-re-generate-all-topics/24142/2)

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

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:45pm UTC](https://meta.discourse.org/t/broken-images-in-production-after-importing-backup/41200/3 "2024-06-08T12:45:50Z")

</div>

This topic was automatically closed after 3004 days. New replies are no longer allowed.
