# Storing Images in the cloud

**URL:** <https://meta.discourse.org/t/storing-images-in-the-cloud/6779>\
**Category:** Self-hosting\
**Tags:** hosting\
**Created:** [May 21, 2013, 11:56pm UTC](https://meta.discourse.org/t/storing-images-in-the-cloud/6779 "2013-05-21T23:56:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![cbonsig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cbonsig/32/104734_2.png) [@cbonsig](https://meta.discourse.org/u/cbonsig)\
**Post date:** [June 3, 2013, 12:42am UTC](https://meta.discourse.org/t/storing-images-in-the-cloud/6779/3 "2013-06-03T00:42:12Z")

</div>

I’m having no luck with S3 or Imgur either. Both seem so tantalizingly close. I’m not competent to fix the code, but at least I can point out the current state of affairs. This applies to 0.9.2

## S3 Issues

It seems like the format has changed for AWS resources. I created a bucket, and the only option for region is “US Standard”. On the setup page, I entered the keys, and figured out that the region had to be set to “us-east-1”. With that, I can upload successfully, but the image URL is incorrect, the image appears broken. Discourse creates code like this:

```
<img src="//BUCKETNAME.s3-us-east-1.amazonaws.com/IMAGEFILENAME.png" width="690" height="690">

```

I can manually edit the URL to fix the image. It needs to look like this:

```
<img src="//s3.amazonaws.com/BUCKETNAME/IMAGEFILENAME.png" width="690" height="690">

```

## Imgur Issues

Imgur uploads fail with an error “Sorry, but we couldn’t determine the size of the image. Maybe your image is corrupted?” … @benbeltran seems to have found a fix for this, but I haven’t been able to replicate it. More details here:

[https://github.com/discourse/discourse/issues/890](https://github.com/discourse/discourse/issues/890)

## Local image storage

This works fine, but I gather from @colin above that this approach doesn’t survive (re?)deployment. I’m not exactly sure what that means… Is there a problem preserving local images through an upgrade cycle? Are there any issues with starting off using local storage, then switching later when Imgur/S3 get sorted out?

---

_[View the full topic](https://meta.discourse.org/t/storing-images-in-the-cloud/6779)._
