The art to having a website with decent imagery is to allow the user/administrator to crop the images. Despite advancing web technologies, I still cannot trust a computer to scale, resize or crop an image without the resulting image being of someones foot.

There are certain ‘off-the-shelf’ products, mainly for ASP.net, with very little introduced into PHP, so I had to build my own using helpful libraries and plugins.

The Cropping

Writing a JavaScript cropping tool from scratch is no small challenge, getting a bug-free environment where all of the calculations are perfect can take weeks of hairless programming sessions and various mental breakdowns! And with my hair still in tact and mental capacity intact I implemented jCrop (I let someone else do the hard work). I am continuously reminding people that reinventing the wheel is both a waste of time, energy and sanity but the odds are against you. If a plugin is popular then the chances are that their solution will be 10 times better than yours as theirs have probably evolved over several months if not years!

More >