Broken Web Site Images

Broken Images – Ezoic and Amazon Associates Product API

Adrienne Boswell

If you use Ezoic for monetization and are an Amazon Affiliate using the Product Advertising API, your product images may be broken.

I ran into this problem recently with The Good Plate. As much as I enjoy getting money from Ezoic, they have been giving me some problems recently. If you are running into broken or missing images, read on.

Ezoic Image Optimization

Your Images Missing Entirely in Vivaldi

When you use Ezoic’s image optimization, the name Ezoic is in the image’s source. For some browsers, like Vivaldi, if you block ads and trackers in settings, images from Ezoic’s CDN will not render.

Images Blocked

This image shows how many ads or trackers Vivaldi was blocking when I looked at one of my pages at The Good Plate, Stovetop Barbecues Chicken Thighs. The image source Vivaldi was looking at was:

<img decoding="async" style="border-width:1px;border-style:solid;border-color:#666" width="768" height="432" src="data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22768%22%20height=%22432%22%3E%3C/svg%3E" class="ezlazyload attachment-medium_large size-medium_large" alt="Stovetop Barbecue Chicken Served" data-ezsrcset="https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2024/06/stovetop-barbecue-chicken-served-768x432.webp 768w,https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2024/06/stovetop-barbecue-chicken-served-150x84.webp 150w,https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2024/06/stovetop-barbecue-chicken-served-480x270.webp 480w,https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2024/06/stovetop-barbecue-chicken-served.webp 1200w" sizes="(max-width: 768px) 100vw, 768px" ezimgfmt="rs rscb1 src ng ngcb1 srcset" data-ezsrc="https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2024/06/stovetop-barbecue-chicken-served-768x432.webp">

And this is how the image rendered on the page. Notice, absolutely nothing. That’s kind of scary when it’s your own page and you KNOW you put an image there.

Image 2
With blocking ads and trackers on.

Once you turn off blocking, your image will render just fine.

You can turn off blocking entirely or keep blocking on with exceptions. I chose to keep blocking, but since I need to see images on my site, I added it to the list of exceptions. Once I did that, the browser saw this.

Unblocks
<img decoding="async" style="border-width:1px;border-style:solid;border-color:#666" width="768" height="432" src="https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2024/06/stovetop-barbecue-chicken-served-768x432.webp?ezimgfmt=rs:738x415/rscb1/ngcb1/notWebP" class="attachment-medium_large size-medium_large ezlazyloaded" alt="Stovetop Barbecue Chicken Served">
Image 3

Broken Images – Amazon Associates Product Advertising API

So, you are all pleased with yourself because you can see your images, and then you see this! This is even scarier because it means visitors see broken images rather than the equipment you want them to buy at Amazon. Sure, they can click on the link and see the photo to do that, but who in their right mind will do that? No one. Your visitor will think you have a broken site, which means your recipe is broken, and off they go to another website – never to return.

Equipment Broken images
Broken equipment images

What is the Amazon Associates Product Advertising API?

Amazon used to have a site stripe that gave associates a link code with an image. Many people were using that, and then in December of 2023, Amazon sunsetted it, and the only way to get pictures was to use the Amazon Associates Product Advertising API.

The PA API, sometimes called, allows you to use Amazon’s images for your website to advertise them. Amazon does not want you to use your photos if you are an affiliate. They want you to use theirs because they are the most up-to-date according to what the seller has provided them.

The Product Advertising API (PA API) provides programmatic access for users to search and get detailed product information. Users can get detailed information about products such as product title, description, image urls, prices, similar products, prime eligibility, offers and many other details that can be used to monetize their websites by giving recommendations and promoting the products.

Amazon
  • To qualify to request access to PA API, you will need an associate’s account.
  • you will have to complete 3 qualifying sales in the first 180 days
  • You will also have to comply with the Operating Agreement. Once approved as an Associates account, you will see a ‘Request for PA API access’ button.

Amazon is not very clear about how to use the API, so many people used the site strip instead. When Amazon sunsetted the site stripe, WP Recipe Maker was nice enough to enable Amazon product images if you were authorized for the PA API.

Let’s look at the source for one of these broken images: the Infrared Cooking Thermometer.

<img decoding="async" data-pin-nopin="true" class="wprm-recipe-equipment-image-amazon ezlazyloaded" src="https://sf.ezoiccdn.com/ezoimgfmt/m.media-amazon.com/images/I/419+mFKYriL._SL500_.jpg?ezimgfmt=rs:150x150/rscb1/ng:webp/ngcb1" width="150" alt="Infrared Cooking Thermometer" ezimgfmt="rs rscb1 src ng ngcb1" data-ezsrc="https://sf.ezoiccdn.com/ezoimgfmt/m.media-amazon.com/images/I/419+mFKYriL._SL500_.jpg?ezimgfmt=rs:150x150/rscb1/ng:webp/ngcb1" ezoid="0.9401179066461967">

And let’s compare that with the equipment image you can see, the Thermometer Probe:

<img decoding="async" data-pin-nopin="true" width="150" height="150" src="https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2023/10/square-dot-thermometer-probe-500x500.jpg?ezimgfmt=rs:150x150/rscb1/ngcb1/notWebP" class="attachment-150x150 size-150x150 ezlazyloaded" alt="thermometer probe" data-ezsrcset="https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2023/10/square-dot-thermometer-probe-500x500.jpg?ezimgfmt=ngcb1/notWebP 500w,https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2023/10/square-dot-thermometer-probe-60x60.jpg?ezimgfmt=ngcb1/notWebP 60w,https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2023/10/square-dot-thermometer-probe-96x96.jpg?ezimgfmt=ngcb1/notWebP 96w" sizes="(max-width: 150px) 100vw, 150px" ezimgfmt="rs rscb1 src ng ngcb1 srcset" data-ezsrc="https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2023/10/square-dot-thermometer-probe-500x500.jpg?ezimgfmt=rs:150x150/rscb1/ngcb1/notWebP" ezoid="0.6552186630873116" srcset="https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2023/10/square-dot-thermometer-probe-500x500.jpg?ezimgfmt=ngcb1/notWebP 500w,https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2023/10/square-dot-thermometer-probe-60x60.jpg?ezimgfmt=ngcb1/notWebP 60w,https://sf.ezoiccdn.com/ezoimgfmt/the-good-plate.com/wp-content/uploads/2023/10/square-dot-thermometer-probe-96x96.jpg?ezimgfmt=ngcb1/notWebP 96w">

So, now you know that the CDN’s source for the broken images is m.media.amazon.com, a third party, and the image that is not broken is the first party, the-good-plate.com. What’s happening is Amazon is protecting its servers from Hot Linking. If you are an authorized PA API user, you get the image; if not, you get a 403 bad request. Trying to render a source that’s a 403 will break the image.

Fixing Broken Images

After many hours of chatting with Ezoic’s support team, I found the only way to get around this is to disable the image optimization feature at Ezoic.

Ezoic Image Optimize to fix broken images
  1. Go to ezoic.com
  2. Log into your account
  3. Click on Leap
  4. Click on Optimize
  5. Click on Images
  6. Turn off optimization for images
  7. Click Next
  8. Click Activate

When you refresh the page, you can see all the images!

<img decoding="async" data-pin-nopin="true" class="wprm-recipe-equipment-image-amazon ezlazyloaded" src="https://sf.ezoiccdn.com/ezoimgfmt/m.media-amazon.com/images/I/419+mFKYriL._SL500_.jpg?ezimgfmt=rs:150x150/rscb1/ng:webp/ngcb1" width="150" alt="Infrared Cooking Thermometer" ezimgfmt="rs rscb1 src ng ngcb1" data-ezsrc="https://sf.ezoiccdn.com/ezoimgfmt/m.media-amazon.com/images/I/419+mFKYriL._SL500_.jpg?ezimgfmt=rs:150x150/rscb1/ng:webp/ngcb1" ezoid="0.9401179066461967">
<img decoding="async" data-pin-nopin="true" class="wprm-recipe-equipment-image-amazon" src="https://m.media-amazon.com/images/I/419+mFKYriL._SL500_.jpg" width="150" alt="Infrared Cooking Thermometer">

Notice it’s the same image, and since The Good Plate is authorized, its code works just fine.

Broken images are gone!
Images are not broken

So, if you have been scratching your head or pulling out your hair because you are monetizing with Ezoic but having problems with images, this could save your sanity. Feel free to contact us if you have questions.

Bok Choy Chicken Soup PlatedBok Choy Chicken Soup Plated

Bok Choy Chicken Soup Plated

About the author

Adrienne has been a web developer for over 20 years and enjoys sharing snippets of code she has written.

Leave a Comment