@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?
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.