In Ecommerce CDN, Hosting Guides, Magento 2 Guides

Setting up Ecommerce CDN on Magento 2 (HTTPS stores)

Tom Ashworth

Author Tom Ashworth

Adding Ecommerce CDN to your Magento 2 config provides serious improvements in Magento 2 performance, particularly the client-facing store view. In order to implement Ecommerce CDN on your store, do the following:

1) Create your CDN resource by following this guide.

2) Log in to your Magento 2 store.

3) Click the ‘Stores’ menu item near the bottom of the left-hand menu and click ‘Configuration’.

4) Now select ‘Web’ under ‘General’.

5) Scroll down to the ‘Base URLs (Secure)’ section and input your HTTPS CDN URL as shown below. Make sure the URL starts with https:// and finishes with /pub/media/ as below.

6) Click ‘Save Config’.

7) That’s it! Ecommerce CDN should now be implemented for all product images.

NB: You can check that it’s working correctly by visiting the front end of your store and right clicking a home page image, then selecting ‘Open image in new tab’  in Chrome (or similar option in any other browser!). If your image URL in the new tab is a CDN URL then you’ll know that it’s working correctly.