# S3: Failed to optimize image: no images defined

**URL:** <https://meta.discourse.org/t/s3-failed-to-optimize-image-no-images-defined/118968>\
**Category:** Bug\
**Created:** [29.Май.2019 09:20:11 UTC](https://meta.discourse.org/t/s3-failed-to-optimize-image-no-images-defined/118968 "2019-05-29T09:20:11Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![JulesW](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/julesw/32/141290_2.png) [@JulesW](https://meta.discourse.org/u/JulesW)\
**Post date:** [29.Май.2019 09:20:11 UTC](https://meta.discourse.org/t/s3-failed-to-optimize-image-no-images-defined/118968/1 "2019-05-29T09:20:11Z")

</div>

Version v2.3.0.beta9 +665. Error summary is:

```plaintext

hostname	localhost-app
process_id	162
application_version	b114bcd2949fee2925eab8faf34cd02d64eb3ab1
job	Jobs::CreateAvatarThumbnails
db	default
location	/tmp/discourse-thumbnail20190529-162-lvynlw.gif
error_message	/var/www/discourse/app/models/optimized_image.rb:338:in `convert_with': convert: unable to open image '//my-s3-bucket.s3.dualstack.us-west-1.amazonaws.com/original/1X/e806e13d29b85e6c7c12d59f00ce73bc1948034f.gif': No such file or directory @ error/blob.c/OpenBlob/3497. convert: no images defined `gif:/tmp/discourse-thumbnail20190529-162-lvynlw.gif' @ error/convert.c/ConvertImageCommand/3300.

```

I’m rehearsing a deploy process for a new discourse site which has been running in dev for a while now (with no problems re: S3 image hosting), and I’m now having some trouble with S3 image hosting.

I can reproduce it with a [fresh install as per the docs](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md). Then I add my S3 credentials [etc as per these docs](https://meta.discourse.org/t/setting-up-file-and-image-uploads-to-s3/7229).

To test, I then set a custom avatar of the admin user.

The avatar is successfully uploaded to S3 (and can be seen in the `original` folder within the bucket). But the thumbnails etc fail to get created as per that error message.

I’m at a loss to what’s happening here. Any ideas?

Can someone tell me how I can force an install of build 424 (which was the working version in my dev environment)?

Only differences I’ve spotted so far are the imagemagick version:

```plaintext
Version: ImageMagick 7.0.8-42 Q16 x86_64 2019-05-05 https://imagemagick.org
vs
Version: ImageMagick 7.0.8-42 Q16 x86_64 2019-04-29 https://imagemagick.org

```

Regarding the error I’m seeing; this is the bit that sticks out to me:

```plaintext
convert: unable to open image '//my-s3-bucket.s3.dualstack.us-west-1.amazonaws.com/original/1X/e806e13d29b85e6c7c12d59f00ce73bc1948034f.gif': No such file or directory

```

Should there be a URL scheme in front of the `//`? Is this trying to access the local filesystem?

---

_[View the full topic](https://meta.discourse.org/t/s3-failed-to-optimize-image-no-images-defined/118968)._
