Setting up Image Compression for Websites

This topic applies to

Applies to

Commerce Web Stores

 

Image compression enables you to reduce the file size of images used in Commerce websites, Site Builder websites and SCIS. Compressed images load faster resulting in better website performance. The higher the compression level, the smaller the file size and the quicker it is to load. Higher compression levels also lower the quality of the image. However, the reduction in quality typically isn’t noticeable. The available levels of compressed image quality are:

  • Very High (minimum compression)

  • Optimum (recommended)

  • Standard

  • Low (maximum compression)

You can define image compression settings at the website level which apply to all images displayed on website domains. You can also define image compression settings in the File Cabinet for any subfolder of the Web Site Hosting Files folder. Defining compression settings at the folder level, means that images in the folder are compressed regardless of where they are accessed from. If you set different image compression settings for a website and folder, the compression settings used for an image depends on where the image is accessed from. If it is accessed from a website, the website compression settings are used. If it is accessed directly from the folder (for example, by SCIS), then the folder settings are applied.

If image compression settings apply to an image, a compressed copy of the image is created the first time it is accessed. The original image is not affected. The compressed copy of the image is cached, either internally, or on the CDN, if CDN is enabled for the website. See CDN Caching for more information.

Which Images are Compressed?

Image compression is applied to all images in the website or folder that are:

  • JPEG or PNG format. Other file formats are not compressed.

  • Between 500KB and 5 MB. Images that fall outside of this range are not compressed.

  • Stored in the NetSuite file cabinet. Images stored outside of NetSuite and linked to from the website are not compressed.

  • Not already resized. Resized images are automatically compressed using the ‘Optimum’ image compression setting regardless of the setting chosen at the site or folder level. See Setting Up Image Resizing for SuiteCommerce for information about resizing images.

To set up image compression for a website

  1. Go to Setup > > Set Up Web Site.

  2. Click Edit next to the website you want to modify.

  3. Click the Images subtab.

  4. Select Compress All Website Images. This turns on image compression for all images in the website that meet the criteria defined in Which Images are Compressed?.

  5. Select the image quality setting to use from the Compressed Image Quality dropdown. The options are:

    • Low (maximum compression) - minor reduction in quality

    • Standard - minor reduction in quality when images are zoomed

    • Optimum (recommended) – occasional minor reduction in quality when images are zoomed

    • Very High (minimum compression) - no noticeable reduction in quality at any time

  6. Select Strip Metadata to remove all metadata, such as camera details, caption, or copyright information, from the images. Doing this reduces the file size further.

  7. Select Chroma Subsampling to modify the image file in a way that reduces the color information in favor of luminance data. The human eye can detect differences in luminosity better than it can detect differences in color, so using chroma subsampling results in image files that look the same but are smaller in size. This is suitable only for digital images.

  8. Click Save.

When any image is accessed from any domain that belongs to the website, the image compression parameters are applied.

To set up image compression for a File Cabinet folder

  1. Go to Setup > SuiteCommerce Advanced > Web Site Hosting Files.

  2. Click Edit next to the image folder to which you want to apply image compression.

  3. Click the Hosted Images Compression subtab.

  4. Select Compress All Website Images. This turns on image compression for all images in the folder that meet the criteria defined in Which Images are Compressed?.

  5. Select the image quality setting to use from the Compressed Image Quality dropdown. The options are:

    • Low (maximum compression) - minor reduction in quality

    • Standard - minor reduction in quality when images are zoomed

    • Optimum (recommended) – occasional minor reduction in quality when images are zoomed

    • Very High (minimum compression) - no noticeable reduction in quality at any time

  6. Select Strip Metadata to remove all metadata, such as camera details, caption, or copyright information, from the images. Doing this reduces the file size further.

  7. Select Chroma Subsampling to modify the image file in a way that reduces the color information in favor of luminance data. The human eye can detect differences in luminosity better than it can detect differences in color, so using chroma subsampling results in image files that look the same but are smaller in size. This is suitable only for digital images.

  8. Click Save.

When any image in this folder or any subfolders is accessed, the image compression parameters are applied. Image compression will be applied to any images added to the folder in the future as well.

Unlike image compression settings defined on a website record, image compression defined for a folder applies to:

  • Images on the system domain. System domains are those that have the format system.netsuite.com.

  • Images that are not associated with website domains, such as those used by SCIS.

If a folder has image compression applied, any subfolders inherit the parent folder’s settings. You cannot define different compression settings for the subfolders. Similarly, if you try to apply image compression settings to a folder whose subfolders already have image compression settings defined, the subfolder settings are removed and the parent folder settings apply to the subfolders. A warning message is displayed before the subfolder settings are removed.

Related Topics