namespace "storage" do
task :upgrade_avatars => :environment do
User.active.where.not(:image_file_name => nil).in_batches.each_record do |user|
+ next if user.avatar.attached?
+
io = File.open(user.image.path)
filename = user.image.original_filename
content_type = if user.image.content_type.nil?