Allowing users to crop and resize images Ruby on Rails

Tom Pinchen picture Tom Pinchen · Mar 8, 2013 · Viewed 11.2k times · Source

Sorry for the fairly generic question but I was wondering whether anyone had any recommendations on how to best allow users to crop and edit their own images.

What I would like to happen is that when a user uploads their image on my app for the app to show a copy of the image with an overlay that only allows a fixed aspect ratio (perhaps 4:3), the user would then be able to select the area of the image they would like to crop and save as their image.

The best example I can think of this is when cropping cover photos on Facebook.

I have looked into the various Gems and elements that I believe would be needed as below:

Carrierwave - For file uploading (and I think cropping - correct me if I am wrong) ImageMagick/Mini-Magick/Rmagick - to handle processing the image.

However I am still a little unsure how these fit together.

Any advice people have on the best combination of gems and how they work together to achieve this cropping feature would be much appreciated.

Answer