Title: New Amazon Aff Image Code
Last modified: November 24, 2023

---

# New Amazon Aff Image Code

 *  Resolved [afreedrink](https://wordpress.org/support/users/afreedrink/)
 * (@afreedrink)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/new-amazon-aff-image-code/)
 * Further to Amazon removing the code for images in Sitestripe, I’m replacing all
   my images – which include images in tables – with the new code supplied by the
   PA-API. I’ve previously inserted the image link using html.
 * When I insert the new code it throws a 403 error on WordPress? Any suggestions
   on how to insert the new code into a TablePress Table?
 * An example of code to insert follows
 * <**html**><**head**><**meta** charset=”utf-8″/></**head**><**body**> <!– HTML
   code for ASIN : B000FGVFP8–> <**div** class=”paapi5-pa-ad-unit pull-left”><**
   div** class=”paapi5-pa-product-container”><**div** class=”paapi5-pa-product-image”
   ><**div** class=”paapi5-pa-product-image-wrapper”><**a** class=”paapi5-pa-product-
   image-link” href=”[https://www.amazon.com/dp/B000FGVFP8?tag=asoc01-20&amp;linkCode=ogi&amp;th=1&amp;psc=1&#8243](https://www.amazon.com/dp/B000FGVFP8?tag=asoc01-20&amp;linkCode=ogi&amp;th=1&amp;psc=1&#8243);
   title=”N/A” target=”_blank”></**a**><**img** class=”paapi5-pa-product-image-source”
   src=”[https://m.media-amazon.com/images/I/51nKnEFryuL._SL500_.jpg&#8221](https://m.media-amazon.com/images/I/51nKnEFryuL._SL500_.jpg&#8221);
   alt=”N/A”></**div**></**div**><**div** class=”paapi5-pa-product-details”><**div**
   class=”paapi5-pa-product-title”><**a** class=”paap5-pa-product-title-link” href
   =”[https://www.amazon.com/dp/B000FGVFP8?tag=asoc01-20&amp;linkCode=ogi&amp;th=1&amp;psc=1&#8243](https://www.amazon.com/dp/B000FGVFP8?tag=asoc01-20&amp;linkCode=ogi&amp;th=1&amp;psc=1&#8243);
   title=”N/A” target=”_blank”>N/A</**a**></**div**><**div** class=”paapi5-pa-product-
   list-price”><**span** class=”paapi5-pa-product-list-price-value”></**span**></**
   div**><**div** class=”paapi5-pa-product-prime-icon”><**span** class=”icon-prime-
   all”></**span**></**div**></**div**></**div**></**div**> </**body**></**html**
   > <**style**> .paapi5-pa-ad-unit { border: 1px solid #eee; margin:2px; position:
   relative; overflow: hidden; padding: 22px 20px; line-height: 1.1em; } .paapi5-
   pa-ad-unit * { box-sizing: content-box; box-shadow: none; font-family: Arial,
   Helvetica, sans-serif; margin: 0; outline: 0; padding: 0; } .paapi5-pa-ad-unit.
   pull-left { float: left; } .paapi5-pa-ad-unit.pull-right { float: right; } .paapi5-
   pa-ad-unit **a** { box-shadow: none !important; } .paapi5-pa-ad-unit a:hover {
   color: #c45500; } .paapi5-pa-product-container { width: 180px; height: 210px;}/*
   fixed width and height of product image to 150px */ .paapi5-pa-product-image {
   display: table; width: 150px; height: 150px; margin: 0 auto; text-align: center;}.
   paapi5-pa-product-image-wrapper { display: table-cell; vertical-align: middle;}.
   paapi5-pa-product-image-link { position: relative; display: inline-block; vertical-
   align: middle; } .paapi5-pa-product-image-source { max-width: 150px; max-height:
   150px; vertical-align: bottom; } .paapi5-pa-percent-off { display: block; width:
   32px; height: 25px; padding-top: 8px; position: absolute; top: -16px; right: -
   16px; color: #ffffff; font-size: 12px; text-align: center; -webkit-border-radius:
   50%; -moz-border-radius: 50%; -ms-border-radius: 50%; border-radius: 50%; background-
   color: #a50200; background-image: -webkit-linear-gradient(top, #cb0400, #a50200);
   background-image: linear-gradient(to bottom, #cb0400, #a50200); } .paapi5-pa-
   ad-unit.hide-percent-off-badge .paapi5-pa-percent-off { display: none; } .paapi5-
   pa-product-details { display: inline-block; max-width: 100%; margin-top: 11px;
   text-align: center; width: 100%; } .paapi5-pa-ad-unit .paapi5-pa-product-title**
   a** { display: block; width: 100%; overflow: hidden; white-space: nowrap; text-
   overflow: ellipsis; font-size: 13px; color: #0066c0; text-decoration: none; margin-
   bottom: 3px; } .paapi5-pa-ad-unit .paapi5-pa-product-title a:hover { text-decoration:
   underline; color: #c45500; } .paapi5-pa-ad-unit.no-truncate .paapi5-pa-product-
   title **a** { text-overflow: initial; white-space: initial; } .paapi5-pa-product-
   offer-price { font-size: 13px; color: #111111; } .paapi5-pa-product-offer-price-
   value { color: #AB1700; font-weight: bold; font-size: 1.1em; margin-right: 3px;}.
   paapi5-pa-product-list-price { font-size: 13px; color: #565656; } .paapi5-pa-
   product-list-price-value { text-decoration: line-through; font-size: 0.99em; }.
   paapi5-pa-product-prime-icon .icon-prime-all { background: url(“[https://images-na.ssl-images-amazon.com/images/G/01/AUIClients/AmazonUIBaseCSS-sprite_2x_weblab_AUI_100106_T1-4e9f4ae74b1b576e5f55de370aae7aedaedf390d._V2_.png&#8221](https://images-na.ssl-images-amazon.com/images/G/01/AUIClients/AmazonUIBaseCSS-sprite_2x_weblab_AUI_100106_T1-4e9f4ae74b1b576e5f55de370aae7aedaedf390d._V2_.png&#8221);)
   no-repeat; display: inline-block; margin-top: -1px; vertical-align: middle; background-
   position: -192px -911px; background-size: 560px 938px; width: 52px; height: 15px;}.
   paapi5-pa-product-offer-price, .paapi5-pa-product-list-price, .paapi5-pa-product-
   prime-icon { display: inline-block; margin-right: 3px; } @**media** (-webkit-
   min-device-pixel-ratio: 2), (min-resolution: 192dpi) { .paapi5-pa-ad-unit .paapi5-
   pa-product-prime-icon .icon-prime-all { background: url(“[https://images-na.ssl-images-amazon.com/images/G/01/AUIClients/AmazonUIBaseCSS-sprite_2x_weblab_AUI_100106_T1-4e9f4ae74b1b576e5f55de370aae7aedaedf390d._V2_.png&#8221](https://images-na.ssl-images-amazon.com/images/G/01/AUIClients/AmazonUIBaseCSS-sprite_2x_weblab_AUI_100106_T1-4e9f4ae74b1b576e5f55de370aae7aedaedf390d._V2_.png&#8221);)
   no-repeat; display: inline-block; margin-top: -1px; vertical-align: middle; background-
   position: -192px -911px; background-size: 560px 938px; width: 52px; height: 15px;}}/*
   css for mobile devices when device width is less than 441px*/ @**media** screen
   and (max-width: 440px) { .paapi5-pa-ad-unit { float: none; width: 100%; } .paapi5-
   pa-product-container { margin: 0 auto; width: 100%; } .paapi5-pa-product-details{
   text-align: center; margin-top: 11px; } } </**style**>

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/new-amazon-aff-image-code/#post-17226550)
 * Hi!
 * Thanks for your post and sorry for the trouble!
 * This code looks wrong to me, it seems to be a full HTML page. The actual code
   to be inserted is likely shorter.
 * That said, the 403 error means “Forbidden”, which indicates that something on
   the server is already blocking the request (as a false positive). This could 
   be a security program, like “mod_security” for example. To find out more about
   this, you will need to check the server’s log files, maybe with the help of your
   web host company. Then, the configuration of that security software can be adjusted,
   so that sending this code to the server as part of a change in a table should
   be possible.
 * As all this already happens before TablePress is executed, there’s nothing that
   I can do about this in TablePress, sorry.
 * Regards,
   Tobias
 *  Thread Starter [afreedrink](https://wordpress.org/support/users/afreedrink/)
 * (@afreedrink)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/new-amazon-aff-image-code/#post-17229215)
 * Thanks! That gave me a steer and I’ve resolved it 🙂
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/new-amazon-aff-image-code/#post-17229480)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
   Tobias
 * P.S.: In case you haven’t, please [rate TablePress in the plugin directory](https://wordpress.org/support/plugin/tablepress/reviews/#new-post).
   Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘New Amazon Aff Image Code’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/new-amazon-aff-image-code/#post-17229480)
 * Status: resolved