1

I know that the paperclip gem has an option to create several resized versions of an image. Example:

class User < ActiveRecord::Base
  # Paperclip
  has_attached_file :photo,
    :styles => {
    :thumb => "100x100#",
    :small  => "150x150>",
    :medium => "200x200" }
end

I want the image to be resized to "500x500>" and only keep this resized version (discarding the original).

Is this possible? How?

Ilea Cristian
  • 5,741
  • 1
  • 23
  • 37

1 Answers1

2
class User < ActiveRecord::Base
  # Paperclip
  has_attached_file :photo,
    :styles => {
    :original => "500x500>", #this will resize the original directly
    :thumb => "100x100#",
    :small  => "150x150>",
    :medium => "200x200" }
end
Deepak
  • 2,481
  • 2
  • 23
  • 28