新手问题 carrierwave 设置头像 version

yuchengzhixia · April 26, 2013 · Last by huacnlee replied at April 28, 2013 · 2661 hits

用 mongoid+carrierwave 作用户头像上传处理,用 grid_fs 存储,需要以下头像版本: small: 50*50 normal: 80*80 big: 130*130 huge: 200*200 mobile: 130*130 For retina small@2x: 100*100 normal@2x: 160*160 big@2x: 260*260 huge@2x: 400*400 mobile@2x: 260*260

已经写了基本版本: version :small do process resize_to_fill: [50, 50] end

version :normal do process resize_to_fill: [80, 80] end

version :big do process resize_to_fill: [130, 130] end

version :huge do process resize_to_fill: [200, 200] end

version :mobile do process resize_to_fill: [130, 130] end For retina 的该怎么写?

version :retina_normal ...

#1 楼 @Rei 就是不想再写 5 个,能不能调用前面写过的

#2 楼 @yuchengzhixia 那你就每个大尺寸是小尺寸的两倍就好了

You need to Sign in before reply, if you don't have an account, please Sign up first.