Just as product detail URLs follow a certain pattern, image URLs are just as predictable.
Just as every page has a URL, so too does every product image. Finding the URL is fairly easy in most browsers. In Internet Explorer on Windows, right-click the image and choose Properties. Once you have the image URL, you can bring it up in the browser by placing it in the address bar. Some browsers—Safari for Mac OS X, for instance—make this a single step via the Open Image in New Window context-menu item.
Amazon image URLs are just as dynamic as Amazon pages. By understanding the image URL pattern, you can find images for products based on their ASIN and customize from there.
For instance, the following standard image URL brings up a standard product image, the Google Hacks book cover in Figure 1-6:
Keep in mind that you can link to an image of any product that Amazon sells, as long as you have the ASIN. The following URL shows an iPod MP3 player from Amazon’s Electronics catalog (see Figure 1-8):
These images have something else in common: a 30%
off graphic in the lower-right corner. With closer
examination of the URLs, you can see what might be affecting the
graphic. The section
PE30 corresponds with the
discount amount. What happens if we change this value?
PE50 changes the discount to 50%, as seen in
Just because you can change the discount information on the image doesn’t mean you should. Giving false information about products will only upset potential customers and potentially Amazon.
What if you didn’t want a discount at all? Take out the discount designation for a discount-free image like that shown in Figure 1-10:
Different sizes of images are also predictable and can be requested with a URL. The portion of the URL with all those ZZZ’s specifies its size. The codes and their associated sizes are listed in Table 1-1.
Table 1-1. Image codes and their associated images sizes
40 x 60 pixels, very small
93 x 140 pixels, standard size
317 x 475 pixels, very large
The actual pixel size will vary by item, but these are good approximations for books.
By looking at
the URLs for different products, you
may even pick up other variable style codes. Throwing a
TT in the mix (as Duke Bhuphaibool at Amazon
suggested) tilts the product image, shown in Figure 1-11:
TR sets it
Most product images on Amazon are JPEG files, but there is a way to force the GIF format: