CDN support + Product images page
· One min read
There are two distinct use cases to get URL of an image:
- to use them in your backend processing (e. g. you want to resize it) – use a direct URL
- to present them to an internet user (you typically just provide the URL on another page, e. g. a catolugue or mobile application) – use a CDN URL
In most cases you should use CDN, because the images are cached and provided with lower latency.
We have extended endpoint Eshop Info, section imageCuts to contain cdnURL to provide a CDN path for each particular image cut.
Additionally we added cdnName to all endpoints providing images, such as Product detail, Product list or Order detail. The cdnName contains a timestamp encoded, which get changed whenever the images changes (e. g. a new version is uploaded). The full image URL can be easily built by concatenating cdnUrl and cdnName.
See also a separate article Product images.