Mahmoud Khaled
Mahmoud Khaled

Reputation: 6276

Add paperclip new style doesn't affect old uploaded images

I have Company model with logo image

has_attached_file :logo

I have created many companies with their logos.

Now, I need to add new style

has_attached_file :logo, :styles => { :small => "30x15>", :medium => "155x85>" }

Should I re-upload all my old data to regenerate the new styles? I don't think so.... Or is there any rake task can regenerate styles?

Upvotes: 5

Views: 2246

Answers (1)

Jeff Paquette
Jeff Paquette

Reputation: 7127

See Thumbnail-Generation. If the rake task doesn't work for you, you should be able to use a snippet in the console to invoke reprocess! on the companies in question

Upvotes: 9

Related Questions