Alex Rivera | Logout

CarrierWave and resize to a specific width

Asked 2011-08-25T17:10:08.370
30

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.

Edit
Report

1 Answer

50

You Can use:

process :resize_to_limit => [500, nil]
answered 2012-10-03T16:46:42.760

Your Answer