# Generating missing optimized images with S3

**URL:** <https://meta.discourse.org/t/generating-missing-optimized-images-with-s3/35847>\
**Category:** Product Support\
**Created:** [20 november 2015 om 17:24 UTC](https://meta.discourse.org/t/generating-missing-optimized-images-with-s3/35847 "2015-11-20T17:24:35Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![markersocial](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/markersocial/32/170136_2.png) [@markersocial](https://meta.discourse.org/u/markersocial)\
**Post date:** [29 januari 2021 om 18:44 UTC](https://meta.discourse.org/t/generating-missing-optimized-images-with-s3/35847/10 "2021-01-29T18:44:52Z")

</div>

@supermathie Thanks for your advice. If it seems like all the optimised images for avatars are missing, would just running the second line likely be sufficient?

```plaintext
UserAvatar.all.each {|ua| uaid = ua.gravatar_upload_id || ua.custom_upload_id; Jobs::CreateAvatarThumbnails.perform_async(upload_id: uaid) if uaid }

```

I did a post rebake already, which took quite a long time. So would ideally want to avoid wiping the existing optimised files for post images if possible.

---

_[View the full topic](https://meta.discourse.org/t/generating-missing-optimized-images-with-s3/35847)._
