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?

4

1 回答 1

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
于 2012-10-17T13:42:33.043 回答