Image Resizing and Compression

Image resizing makes it possible to use a single item image on the product details page, in search results, and for thumbnails. By resizing images to an appropriate size, the resizing tool speeds up page load times and improves SEO.

The image resizing tool generates a resized image when it is requested from the website and stores the image in the cache. It does not alter the original image in the File Cabinet.

Resized images are automatically compressed at the optimum compression level regardless of other compression settings. See SMT Image Compression for more detail about compression for other types of images.

Guidelines

Image resizing applies to JPG and PNG files. Compression only applies to JPG files.

Image resizing only applies to images stored in the images folder (Web Site Hosting Files : Live Hosting Files : images).

The resizing tool works best downsizing oversized images. Undersized images stretch and may appear pixelated when resized to larger dimensions. For this reason, your images should be as large as the largest resizing ID dimension at which they’ll be displayed. In most cases, that is 1200×1200. Excessively large item images occupy unnecessary space in the File Cabinet, so you should downsize them with an image editor before uploading to the File Cabinet.

The resizing tool maintains the original aspect ratio. For example, if an image at 1200×1000 pixels is resized to a resize ID of dimensions 600×600, then the resized image renders at 600×500. If you want to change the aspect ratio, you must use an image editor before you upload the image.

Automatic CDN File Size Compression

When images are served from NetSuite's CDN, the CDN might automatically convert PNG and JPG images to modern file formats such as AVIF and WEBP. When a cached image is requested, the CDN automatically calculates whether the converted AVIF or WEBP version of an image has a smaller file size than the PNG or JPG version; if it is, and it is supported by the web browser, it will serve the converted image instead.

You do not need to do anything to enable this feature other than enable CDN caching. For more information about CDN caching, see CDN Caching.

Note:

AVIF and WEBP images are not supported in the NetSuite File Cabinet when uploading item images. Because conversion happens automatically, you should continue to use PNG and JPG file formats for item images.

View Image Size IDs

You can view image resizing settings on the Images subtab of the website setup record at Commerce > Websites > Website List. If the image size IDs are already set up, the IDs and dimensions appear. Here you can change the maximum width and height of your image size IDs.

You can alter the dimensions to suit your needs. The image size IDs correspond with the configuration record, so do not change the IDs.

This screenshot shows a standard set of image size IDs and default dimensions.

Sample resizing IDs

Related Topics

General Notices