画像がバージョンのサイズよりも大きい場合にのみ、carrierwave でバージョン (たとえば、親指) を作成できますか??
例:
version :thumb, :if => :is_thumbnable? do
process :resize_to_fit => [32,nil]
end
protected
def is_thumbnable?(file)
image ||= MiniMagick::Image.open(file.path)
if image.nil?
if image['width'] >= 32 || image['height'] >= 32
true
else
false
end
else
false
end
end