Warning: This is against the terms and conditions of the Amazon affiliate program! Use this only temporarily and at your own risk, if you currently have no other alternative to be EU-GDPR compliant. Learn more in this blog post.
The starting point: external images¶
In the default configuration, ASA2 uses the external image URLs delivered by the PA API to display product images on your website.
Advantages of using external image URLs¶
External image URLs have the following advantages:
- They reduce the number of requests to your own server.
- The external image servers are fast.
- No additional local storage space is used.
Disadvantages of using external image URLs¶
However, there is a decisive disadvantage in terms of data protection:
- The URL of a visitor to your website is transferred to the Amazon image servers when the external images are loaded.
Using ASA2’s local image feature¶
ASA2 has the ability to download external Amazon product images to the local WordPress Media Library and use the internal URLs before delivering the contents to the visitor. This keeps the visitor IP on your server.
Advantages of using internal image URLs¶
Internal image URLs have the following advantages:
- The visitor’s IP address is not transmitted to Amazon servers
Disadvantages of using internal image URLs¶
- More requests are sent to your own domain
- A higher amount of data is created by saving the images locally
Activate local images¶
To use local images with ASA2, you only have to activate the corresponding option, which you can find in section “Options / Images”.
After activation, it is recommended to empty all caches, since they could still contain the external URLs.
The next time a product template is generated, ASA2 will start downloading the images used in the template and storing them in the Media Library.
ASA2 does not pre-download all images provided by the API, but only those used in templates.
Local images flowchart¶
This flow chart illustrates the steps ASA2 takes to replace external image URLs with internal.
What to expect¶
Minimally longer loading time at first template generation¶
After activating the “Local images” function, the first generation of a template will take a short moment longer, since ASA2 downloads the images during this process. The second rendering of a template will be as fast as ever, since the images already exist locally and the generated HTML output containing the local URLs is delivered from the cache.
Product images in the Media Library¶
ASA2 saves the product images with functions implemented in WordPress. Therefore, they are stored and shown in the Media Library. If the ASA2 Repo is used and a matching entry exists, a product image gets attached to this ASA2 Repo item (see column “Uploaded to”).
If no ASA2 Repo item is attached, this may be because it did not exist at the time the image was saved. The “Reattach local images to Repo items” function can be used for this purpose afterwards.
If a product image is not attached to a ASA2 Repo item, this has no negative effects.
Attached local images are displayed in the edit view of a ASA2 Repo item and are linked to the Media Library item.
Refresh local images¶
Local images can be refreshed as follows:
- You delete them from the media library. ASA2 will download these images again on the next request.
- You use the “Refresh interval” option. Then ASA2 will automatically update an image when the specified time period is exceeded. Usually product images never change. Therefore a high interval value is advisable or even to switch it off, as it is by default (option “Never”).