Javascript Amazon Image Hacking

If you have used Amazon Web Services and took a look at the data coming back, it doesn't take long to figure out that Amazon has come of with some kind of system for referencing product images. But until Anil pointed out to me the post Abusing Amazon Images did I realize just how extensive and amazing their system is.

For a while I had been contemplating enhancements to BookQueueToo, a plugin for MovableType, that involved giving users the ability to review the books and items from Amazon in their queue. And one of the features I wanted to give users was the ability to include an image in the post and then to select from a few image transformations to make the post more visually exciting.

I kept putting off writing some lame ImageMagick wrapper that would do what I needed, until I "found" a post about Amazon's image URL-based manipulation protocol. Low and behold, everything I wanted was already there: dynamic image resizing, drop shadows, image blur, image rotation, not to mention a number of other features I personally don't have any use for, but are cool nonetheless

So, I immediately began writing a little javascript routine that would enable someone to hack images from Amazon's product catalog on the fly and began integrating it into the next version of BookQueueToo. This is what I came up with.

Live Demo



Download

Leave a comment