# Importing profile image from url

**URL:** https://meta.discourse.org/t/importing-profile-image-from-url/128445
**Category:** Development
**Created:** [September 12, 2019, 8:20pm UTC](https://meta.discourse.org/t/importing-profile-image-from-url/128445 "2019-09-12T20:20:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![csmu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/csmu/32/124581_2.png) [@csmu](https://meta.discourse.org/u/csmu)
#### Post date: [September 12, 2019, 8:20pm UTC](https://meta.discourse.org/t/importing-profile-image-from-url/128445/1 "2019-09-12T20:20:15Z")

</div>

I’m looking for some example ruby code to import a profile image from a url.

---

<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: [September 12, 2019, 8:39pm UTC](https://meta.discourse.org/t/importing-profile-image-from-url/128445/2 "2019-09-12T20:39:08Z")

</div>

Can you say more? What kind of URL? Topic? Post? User? Google?

What are you doing? What problem are you trying to solve?

---

<div class="post-metadata">

### Author: ![csmu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/csmu/32/124581_2.png) [@csmu](https://meta.discourse.org/u/csmu)
#### Post date: [September 12, 2019, 8:48pm UTC](https://meta.discourse.org/t/importing-profile-image-from-url/128445/3 "2019-09-12T20:48:45Z")

</div>

> [@pfaffman](#):
>
> Can you say more? What kind of URL? Topic? Post? User? Google?

Normal url. Say a s3 public url.

> [@pfaffman](#):
>
> What problem are you trying to solve?

We’re importing a bunch of google contacts for to communicate with for a chamber of commerce.

The chamber of commerce is people centric rather than business centric which is a large part of it’s success. The chamber has provided an image url for each contact.

We want the image url to be mapped to the profile image for each contact we import.

We’re doing the import via ruby.

---

<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: [September 12, 2019, 9:11pm UTC](https://meta.discourse.org/t/importing-profile-image-from-url/128445/4 "2019-09-12T21:11:54Z")

</div>

Have a look at the importers in [discourse/script/import\_scripts at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/tree/master/script/import_scripts). Several of them handle avatars. The answerbase importer appears to read from a CSV, if that’s what you’re doing.
