Imagecache javascript crop has a scaling option!

It took me some time to realize I would not find a decent solution with Jquery Interface to implement some sort of scaling function in my Imagecache javascript crop (formerly imagecrop) module. After some thinking, I found a solution which satisfies me enough to release this for drupal 5. It's now possible to create an imagecache preset with only the javascript action and use the original image to crop - instead of first adding a scaling function, which would result in frustration. On the crop page you can scale the image now. It's a select box at this point, I might change it to a textfield if I get many request for this. For now, it does what I and some clients want. Submit a patch if you want otherwhise (think: a setting on the imagecrop settings page). Anyway, there's an issue about this feature at Use that page to report problems if you find them. Oh - and I can't stress this enough - *only* about the scaling problem in D5, thanks :) So, if you're interested, go to and test out the development version. When the issue above is closed in two weeks, I'll roll out a new release containing some other small, but important fixes! I'll start porting the project to D6 after the drupalcon and - good news - it will use JQuery UI instead of Interface which gives me the opportunity to actually scale the image easier with jquery instead of a page refresh. Update Aug 3, 20:34: A cool patch by swortis now supports the thickbox module. Instead of a window popup, the thickbox overlay is used. Coolness! Trivial stuff to mention:

  • I renamed the project to Imagecache javascript crop instead of imagecrop. Makes more sense, really.
  • Yhager, ping-pong me on irc next week, we really need to have that talk!


Submitted by Paul on January 31, 2013 - 10:40

Hoping you could point me to documentation that walks through how to get Imagecache Javascript Crop working.

I have installed it, (created a new Image Style that uses it) and it is cropping the image ok — but on the node edit page there is not any UI to choose which bit of the image is cropped. I'm sure its my mistake, but I have checked permissions (server and drupal), tried all sorts of settings, but cannot figure out what I'm doing wrong.

So any clues for checking to find my mistake would be great!

irc: d.o: paulhhowells

p.s. running on Drupal 7.19

Submitted by Paul on January 31, 2013 - 11:52

The step I was missing, to get the UI to appear, was to Edit the Content Type, choose Manage Fields, and to Edit the Image field, scroll down and under 'Available imagecrop styles' select the image style I had created which used imagecrop.


You are here