My photo model has a few different versions, and I only updated the tiny_thumb. Can I just refresh that one type rather than all the other types as well?
A clip from my model:
class Photo < ActiveRecord::Base
has_attached_file :photo,
:styles => { :cropped_thumb => {:geometry => "115x70#", :jcrop => true}, :resized_thumb => {:geometry => "115x70>"}, :deal => {:geometry => "64x56#"},
:cropped_large => {:geometry => "#{PHOTO_IMAGE_WIDTH}x#{PHOTO_IMAGE_HEIGHT}#", :jcrop => true},
:resized_large => {:geometry => "#{PHOTO_IMAGE_WIDTH}x#{PHOTO_IMAGE_HEIGHT}>"},
:tiny_thumb => {:geometry => '120x120>'},
I tried this..
rake paperclip:refresh:tiny_thumb class=Photo
But I think it was a poor guess and didn't work.
I haven't tried but you can do this in your ruby script:
Photo.all.each{ |instance| instance.photo.reprocess!(:tiny_thumb) }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With