Avatars not showing after import

I’m currently trying to import from IPB using a local dev environment on macOS without any virtualization.

I’m importing avatars via

upload = create_upload(user.id, img_path, File.basename(img_path))
if upload && upload.persisted?
    user.user_avatar.update(custom_upload_id: upload.id)
    user.update(uploaded_avatar_id: upload.id)
    puts "Error: Upload did not persist #{img_path}!"

which creates the upload, creates the user_avatar and updates the uploaded_avatar_id for the user. However, the avatars are not showing after I import the user and after Sidekiq has processed all tasks.

The uploaded file also exists in the file system at
and is referenced as

Any ideas on how to find more information on why the avatars are not showing?

Several imports later, I just wanted to give an update here: the version of the convert tool installed in my dev environment doesn’t support the bicubic interpolation method which is used in app/models/optimized_image.rb

I’ve found @marguerite’s post here, which helped me getting avatars to show up locally.

1 Like