Reprocessing images of different versions in Carrierwave

前端 未结 5 1368
甜味超标
甜味超标 2021-02-02 14:12

Using Carrierwave, I created 3 versions of an avatar - an original, a small_thumb and a large_thumb using the following lines:

process :resize_to_limit => [40         


        
5条回答
  •  粉色の甜心
    2021-02-02 14:42

    I haven't tried but maybe putting something like.

    def reprocess_image
      image.reprocess(crop_x,crop_y,crop_w,crop_h)
      image.recreate_versions!
    end
    

提交回复
热议问题