# S3: Impossibile ottimizzare l'immagine: nessuna immagine definita

**URL:** https://meta.discourse.org/t/s3-failed-to-optimize-image-no-images-defined/118968
**Category:** Bug
**Created:** [29 Maggio 2019, 9:20am UTC](https://meta.discourse.org/t/s3-failed-to-optimize-image-no-images-defined/118968 "2019-05-29T09:20:11Z")
**Posts on this page:** 5
**Page:** 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 Maggio 2019, 9:20am 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?

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [29 Maggio 2019, 12:02pm UTC](https://meta.discourse.org/t/s3-failed-to-optimize-image-no-images-defined/118968/2 "2019-05-29T12:02:35Z")

</div>

Can you update to latest? It should be fixed by [Revert changes to `FileStore::S3Store#path_for` in f0620e7118a76a1fae… · discourse/discourse@a3938f9 · GitHub](https://github.com/discourse/discourse/commit/a3938f98f8b575675fc9b541725aa224fcddf682)

---

<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 Maggio 2019, 10:03pm UTC](https://meta.discourse.org/t/s3-failed-to-optimize-image-no-images-defined/118968/3 "2019-05-29T22:03:39Z")

</div>

Yep that fixed it.

How can I rollback to an older version? Is there a specific stable branch I should be using in production instead of the bleeding edge?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [29 Maggio 2019, 10:16pm UTC](https://meta.discourse.org/t/s3-failed-to-optimize-image-no-images-defined/118968/4 "2019-05-29T22:16:40Z")

</div>

It is not possible to roll back versions. If you want to track a branch other than `tests-passed`, you can, but we generally do not recommend it. See [Which branch of Discourse is used internally?](https://meta.discourse.org/t/which-branch-of-discourse-is-used-internally/75181) for discussion on Discourse release branches. A note on stable, it is only “stable” in that we do not update it very often. While we make every attempt to release bug free software, we don’t guarantee stable to be bug free. Think of stable more as “I know what bugs I have and I’m stuck with them” vs tests-passed which has “unknown bugs appear, but get fixed quickly”.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [30 Maggio 2019, 6:42am UTC](https://meta.discourse.org/t/s3-failed-to-optimize-image-no-images-defined/118968/5 "2019-05-30T06:42:58Z")

</div>


