config-general-web-unsecure

Media Storage CDN Setup

Storing media files in a CDN is another alternative supported in Magento. There is no full
integration with a specific CDN, and you are responsible for choosing and configuring a CDN
on your own. After configuring the CDN, you must complete the configuration from the Admin.
The changes can be made at either the global or website level.

CDN Workflow

When a CDN is selected as media storage, all paths to media on the web store pages are
changed to paths to the CDN. Retrieving media that is stored in a CDN works as follows:

  • When a customer opens a page in the store, the browser addresses the CDN with the request
    to acquire some media files, such as images.
  • If the CDN does not yet have these images in its storage, it requests them from the server,
    and provides images to the customer’s browser.
  • If the CDN already has the required images in storage, it simply serves the requested images
    to the customer’s browser.

Important! When a CDN is used as media storage, JavaScript may not function properly if the CDN
is not in your subdomain. This is a browser security feature.

To configure a content delivery network:

1. On the Admin menu, select System > Configuration.
2. In the panel on the left, under General, select Web.
3. Set the Current Configuration Scope as needed.
4. Click to expand the Unsecure section. Then, do the following:

a. Change the value of the Base Media URL.
b. Change the value of the Base JavaScript URL.
5. Click to expand the Secure section.

a. Change the value of the Base Media URL.
b. Change the value of the Base JavaScript URL.
6. When complete, click the Save Config button.

Leave a Comment

Your email address will not be published. Required fields are marked *