CarrierWave and resize to a specific width

BuddyJoe picture BuddyJoe · Aug 25, 2011 · Viewed 15.3k times · Source

Using CarrierWave in Rails 3.0 how would you go about making the code resize images that have a width larger than 500 pixels to be 500 pixels wide and adjust the height appropriately - keeping the same initial ratio of width to height.

Answer

William Wong Garay picture William Wong Garay · Oct 3, 2012

You Can use:

process :resize_to_limit => [500, nil]