I use a carrier wave to upload images. When loading, I create thumbnails for the image, which is performed using the Rmagick method, resize_to_fill, as shown below.
version :thumb do process :resize_to_fill=> [150, 150] end
It displays all the methods RMagick carrierwave supports (none of which I want):
:resize_to_fill => [150,150]
This works great on large images, but my smaller images are enlarged to 150 x 150. ![: resize_to_fill => [150,150]](https://fooobar.com//img/f38ea69733aa87ebbf63db1c2dffdf85.png)
:resize_to_fit => [150,150]
It has changed again, I want him to be alone!
![: resize_to_fit => [150,150]](https://fooobar.com//img/98651a204cefc524e382c968940d490b.png)
:resize_to_limit => [150,150]
This leaves it as it is, but large images are not cropped. They are modified to maintain aspect ratio.


Here is the result I want and how my small and large images should look.


How to do it? I want smaller images to stay alone and crop only large images to 150 x 150. Is there any other way or parameters that I can pass to resize_to_fill?
source share