Loading

B2C Commerce Dynamic Imaging Service (DIS) FAQ

Publiceringsdatum: Apr 29, 2025
Lösning

What is DIS?

 

The Dynamic Imaging Service (DIS) is an image transformation service that is used to create on-the-fly transformations of an image stored within your B2C Commerce environment. These transformations can be directly presented in your websites.

Dynamic Imaging Service Process Details 

 

 

Which transformation operations are available?

  • Image Scaling allows you to resize your images, But it can't be scaled below a certain size (for example, 10x10 is the smallest supported size), while maintaining the aspect ratio. DIS leverages a sophisticated scaling algorithm to achieve optimal results.
  • Image Cropping allows you to crop out a certain part of your images to display detail parts or incorporate them into a zoom viewer.
  • Image Overlay allows you to compose multiple images into a final result. This can be used for badging, watermarking, or other image composition. It is possible to overlay an image that has been transformed by DIS itself.
  • Image Format Change allows you to change the format of your images, e.g. png to jpeg, to optimize your website footprint.

 

What is a typical DIS scenario?

Imagine the following scenario:

You have a catalog with 100k products and assign a photo agency to create a set of great pictures for all of them, which they deliver to you as high-quality PNG files. Your website designers come up with this great design that will sport 4 products per row in the search result screen. Those images need to be 150x150. So you or the photo agency starts to process all of your images, you upload them, assign them to your products and everything is great. A month later, your designers think that your awesome products should be much more on display. So they decide to use only 3 products per row on search results, but use 250x250 as image size. So you need to go back and process all the images, upload them, and finally reassign them to your products. During development, QA notices that your pages are huge. Maybe you should consider jpg images instead of png. So you go back to your agency. Then, there is this mobile version of your website that needs yet another size of images and so on.

This is where DIS comes in. Instead of processing and uploading all your images in different sizes, formats, DIS allows you upload only one image size. All your other image sizes (or view types) and formats are derived from those images. Now, when you want to change your layout, all you need to do is to change some transformation parameters in your templates and you have all your images scaled and transformed to the desired size. There is no need to ever process, upload, and reassign another image version again. Then whenever you need a different image size or format, you just change around the parameters and you have your new feature right there with the images you need. Think of your next promotions banner containing the images you need without anyone having to open a tool like Photoshop or similar.


How about performance?

So all that on-the-fly processing must come with a price. Is there any latency issue when using DIS instead of preprocessed images? The answer is yes and no. Yes, DIS needs to fetch and transform images before it can deliver them to a browser. However, DIS also functions within the multi-tier caching architecture of B2C Commerce which negates the latency since it is fully integrated into the B2C Commerce environment and makes use of additional CDN caching as with other static content served by the platform. In a typical ecommerce scenario, after your image has been transformed by DIS, it will most likely not be transformed ever again and can be served right from one of the caches at any time. 
Also, DIS is fully integrated into the Commerce Cloud environment and makes use of additional CDN caching through eCDN or Cloudflare same as with other static content served by Commerce Cloud. 


What other benefits are there?

Utilizing DIS can help reduce your data usage. On the B2C Commerce instance, you only need to store one set of images, which helps to cut down storage space. DIS transformed images are also size optimized, so it might help to cut back on data transfer as well.

 

What does it cost?

$0. DIS is included as part of the B2C Commerce platform.

 

How should I use DIS?

First off all, please review the Dynamic Imaging Service documentation which outlines two possible ways to use DIS. While it is possible to build DIS URLs yourself with the help of the documented URL query parameters, it is highly recommended to leverage the B2C Commerce URLUtils Script API to generate URLs through the platform.

From the documentation, you see two possible ways to use DIS. While it is possible to build DIS URLs yourself with the help of the documented URL query parameters, it is highly recommended to leverage the Commerce Cloud Scripting API to generate URLs through the platform.
One reason is, that Commerce Cloud uses several DIS clusters environments to serve customer realms. A Commerce Cloud instance knows which cluster environment it is assigned to and in most cases, this will not change. But there might be cases like a very high load, a disaster scenario or similar, where Commerce Cloud would need to switch to a different cluster environments.
In the case of self-build and hard-coded URLs, this would require a code or parameter change to make this work. When generating URLs through the API, these changes would be picked up automatically without any interaction.
We know that in rare cases, there is a need for "hand-coded" URLs (CSS files as an example), but it should not be considered best practice. Try to stick with the APIs.


What is the ideal source image size?

That depends on your use cases. The best practice would be to create and upload the largest images you would want to present on your website, which you would then serve directly from your B2C Commerce instance as before. All smaller and/or cropped images would be served through DIS, giving you all the freedom described before.

Is there a file size limit for DIS?
The size limit for DIS is 10 MB. Fetching of files larger than 10 MB will be aborted. DIS returns with an error description stating the image is too large.

 

I modified a source image, but cannot see the changes?

If the customer is using fingerprints in the URL, DIS cache purge is not needed. When the image content updates, the fingerprint changes, and the DIS URL is recreated with the new fingerprint, ensuring the correct image is available. The old URL stays cached in DIS and eCDN until it's automatically purged based on its expiration date. This is not a problem because in the Storefront always the most recent URL is used. 

If the URL doesn't change because the customer isn't using fingerprints, cache clearing needs to be performed at each level of the tech stack, in this order.

  • DIS
  • eCDN
  • Customer has a stacked CDN

Please note: Customers can not clear eCDN or DIS cache by themselves neither via Business Manager nor via API. If a cache clear is really required, because a wrong file got cached, please contact B2C Support.

Knowledge-artikelnummer

000391251

 
Laddar
Salesforce Help | Article