How can I push non-stock X-Cart images to the CDN?

How can I push non-stock X-Cart images to the CDN?

If you have images used for banners, in header, footer or other portion of your site and they are not part of the stock X-Cart code you can push them through the CDN by following these simple steps:

  • Upload these images to either "skin/common_files/images" or "skin/your_custom_skin/images" directory.
  • In the template(s) where you want to show these images reference them like this:
    1. if images were uploaded to "skin/common_files/images" - {$ImagesDir}/image_name.ext" width="xx" height="yy" alt="Your image alt tag" />
    2. if images were uploaded to "skin/your_custom_skin/images" - {$AltImagesDir}/image_name.ext" width="xx" height="yy" alt="Your image alt tag" />

 

NOTE: You can also create separate directories for different types of images under "skin/your_custom_skin/images" directory to keep things organized. In that case make sure to include this subdirectory in the path when calling images in the template(s).