# Where to store images and how to migrate them?

**URL:** <https://meta.discourse.org/t/where-to-store-images-and-how-to-migrate-them/47350>\
**Category:** Support\
**Created:** [2016年七月15日 08:38 UTC](https://meta.discourse.org/t/where-to-store-images-and-how-to-migrate-them/47350 "2016-07-15T08:38:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pawanrawal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pawanrawal/32/121665_2.png) [@pawanrawal](https://meta.discourse.org/u/pawanrawal)\
**Post date:** [2016年七月15日 08:38 UTC](https://meta.discourse.org/t/where-to-store-images-and-how-to-migrate-them/47350/1 "2016-07-15T08:38:54Z")

</div>

So we have a discourse instance running at [https://discuss.dgraph.io](https://discuss.dgraph.io).

Somedays back we moved it from DO to AWS. In the process of doing so, our older assets stopped working as we started using S3 for them. I have a couple of questions here.

1. Should we store images on S3 or on the instance itself? I didn’t find a clear answer for this from any topic.
2. I tried to copy some images(which were uploaded before migrating to S3) from the instance to the relevant S3 bucket but it doesn’t work. Somehow the URL for fetching them is still the old one?

I want to find out a way which works for both the images which were uploaded earlier and the new images.

Thanks

---

<div class="post-metadata">

**Author:** ![pawanrawal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pawanrawal/32/121665_2.png) [@pawanrawal](https://meta.discourse.org/u/pawanrawal)\
**Post date:** [2016年七月21日 03:24 UTC](https://meta.discourse.org/t/where-to-store-images-and-how-to-migrate-them/47350/3 "2016-07-21T03:24:12Z")

</div>

Any ideas @zogstrip?

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [2016年八月5日 15:27 UTC](https://meta.discourse.org/t/where-to-store-images-and-how-to-migrate-them/47350/4 "2016-08-05T15:27:19Z")

</div>

If your Discourse instance is running on AWS, it would be best to use S3 to store images/attachments.  
You can use the `uploads:migrate_to_s3` rake task to do the migration 😉

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2019年二月20日 03:12 UTC](https://meta.discourse.org/t/where-to-store-images-and-how-to-migrate-them/47350/5 "2019-02-20T03:12:13Z")

</div>



---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年二月20日 05:21 UTC](https://meta.discourse.org/t/where-to-store-images-and-how-to-migrate-them/47350/6 "2019-02-20T05:21:35Z")

</div>


