2

I want to add a cropping feature in my Rails project that's like what Facebook has today. When you upload your image you can edit the thumbnail so that it shows the part of the image that you want to show in the thumbnail.

Is there a gem that makes this possible in Rails? I've read the RMagick and Paperclip docs and they don't have this feature.

Thanks in advance.

3
  • I'm not sure if this really belongs to sofwarerecs but I think you want papercrop, which is an implementation of jCrop... If you have a RailsCasts Pro subscription you can also take a look at #182 Cropping Images (revised) Mar 26, 2014 at 15:43
  • That's exactly what I meant! Thank you so much for the tip!
    – Breno
    Mar 26, 2014 at 18:28
  • I've added my suggestion as an answer since you find it useful and it evidently fits in here :) Mar 27, 2014 at 1:02

1 Answer 1

0

JCrop

HomepageExamples

The jQuery plugin Jcrop is a quick and easy way to add image cropping functionality to your web application.

Feature Overview

  • Attaches unobtrusively to images or block objects
  • Supports aspect ratio locking & minSize/maxSize setting
  • Callbacks for selection done, or while moving
  • Support for CSS styling, now uses LESS
  • Touch support for mobile devices

Resources for Ruby on Rails

  • Papercrop An easy extension for Paperclip gem to crop your image uploads using jCrop.
  • RailsCasts #182 revised (paid subscription required) Allow users to interactively crop uploaded images using Jcrop and Carrierwave. Includes a live preview that shows the resulting image.
    You can also watch the old episode from 2009 for free.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.