# Image URLs not rendered as images on import

**URL:** https://meta.discourse.org/t/image-urls-not-rendered-as-images-on-import/48840
**Category:** Development
**Created:** [19.Август.2016 00:16:31 UTC](https://meta.discourse.org/t/image-urls-not-rendered-as-images-on-import/48840 "2016-08-19T00:16:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [19.Август.2016 00:16:31 UTC](https://meta.discourse.org/t/image-urls-not-rendered-as-images-on-import/48840/1 "2016-08-19T00:16:31Z")

</div>

I’ve written an importer for a custom database of external images. It’s based on `import_scripts/vanilla_mysql.rb` (and `base.rb`) (pulled just today). It’s creating posts that look good right to me (a few problems with categories yet to work out). Posts have lines like

```
http://example.com/veryFineImage.jpb

```

in them.

- When I look at them the URL isn’t displaying the image.
- If I edit the image, it shows the image in the preview window.
- If I edit and add a space anywhere in the post the image is displayed as expected.

“No problem!” thinks me "just rebake the posts. I do a

```
bundle exec rake rebake

```

on my development box. It rebakes the posts Or so it claims!!!

But, no joy. The image urls still just show up as urls.

On a related note, once I figure this out, will Discourse pull those images to it’s local store like it normally does? Do I need to do anything to force it to do it to all of them? I don’t see any obvious thing to poke in sidekiq.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [19.Август.2016 01:50:33 UTC](https://meta.discourse.org/t/image-urls-not-rendered-as-images-on-import/48840/2 "2016-08-19T01:50:33Z")

</div>

When a high number of posts are imported usually a significant backlog of tasks are created…  
… which include processing remote image URL’s etc.

You can view the number of remaining tasks at your `/sidekiq` page.

A rebake is likely just adding to this queue.

To process the queue more quickly look into increasing the number of workers during the import period.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [19.Август.2016 01:54:10 UTC](https://meta.discourse.org/t/image-urls-not-rendered-as-images-on-import/48840/3 "2016-08-19T01:54:10Z")

</div>

Thanks, @DeanMarkTaylor. So I made the right decision by deciding to stop working on it!

But this is a development box and sidekiq isn’t running. If I back up and upload to a fresh install, will it magically fix itself?

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [19.Август.2016 01:56:11 UTC](https://meta.discourse.org/t/image-urls-not-rendered-as-images-on-import/48840/4 "2016-08-19T01:56:11Z")

</div>

Refer to the discussion here:

> [@Migrate a phpBB3 forum to Discourse](https://meta.discourse.org/t/importing-from-phpbb3/30810):
>
> So, you discovered Discourse and want to know how to migrate from your existing phpBB3 forum? Great! Then keep on reading. This guide will show you how to use the [phpBB3 import script](https://github.com/discourse/discourse/blob/main/script/import_scripts/phpbb3.rb) for importing from phpBB 3.0 up to 3.3. What data can be imported? Users Avatars (optional) Anonymous users (either as user “system” or as suspended users) Password hashes, which can be used with the [migratepassword plugin](https://github.com/communiteq/discourse-migratepassword) (optional) User profile data (birth date, website, location, custom fields, etc.) G…

Which includes commands to run for sidekiq etc.

Someone else might have to answer questions about magical fixes.
