The ultimate time saver

The cropping in action

I finally decided to really do something about the situtation for approving (or in somce cases deleting) sent in helmet photos. The helmet photos are sent in in all various shapes and sizes and they need to be 130×116 in size when they appear in the driver’s profile pages.

Up until today there’s been a lot of manual work to update the photos as they have been cropped and resized in an image editor and then been uploaded via FTP once they’ve been resized and renamed. Time consuming.

It would of course be much better if the cropping and saving could be done on-the-fly at the website. I’ve been on the lookout for some Ajax scripts that could do the cropping but haven’t really found any that suits my needs until today. The reason for me not writing one from scratch is because I suck at Javascript and Ajax. I fortunately found the jsCropperUI which does the trick just perfectly! All I had to do was to write a simple PHP back end to handle the actual saving of the file and I was good to go!

I emptied the helmet queue in no-time!

And if your helmet submissions weren’t included it was probable because one of the following reasons:

  • The submitted helmet photo didn’t actually include a helmet
  • The driver wasn’t wearing the helmet
  • The file wasn’t a JPG but a BMP file
  • The photo was smaller than 130×116 pixels
  • The quality of the photo was just too bad

Leave a Reply