Loading
Salesforce now sends email only from verified domains. Read More
Get Started with B2C Commerce
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Optional community DIS product image wrapper

          Optional community DIS product image wrapper

          The optional open-source dis-product-image-wrapper project helps some SFRA and SiteGenesis projects centralize product image parameters and use JavaScript helpers. It isn't a required replacement for URLUtils and MediaFile from the B2C Commerce API.

          For the recommended B2C Commerce path, see Related Dynamic Imaging Service Topics and Dynamic Imaging Service . For URLUtils and MediaFile reference, see Script API . The sections below only describe the community cartridge.

          What the community project provides

          The GitHub project documents a plugin_dis cartridge, JSON configuration of view types (for example, large / medium / small dimensions), and a helper such as ProductImageDIS to obtain image objects in ISML. Behavior and file names in the repository can change between releases; use the current README and wiki on the repository, not a printed line-number or path from an older document.

          Repository and access

          • Repository: SalesforceCommerceCloud / dis-product-image-wrapper on GitHub
          • Wiki (when published): dis-product-image-wrapper wiki for template lists and project-specific changes
          • Access can require a GitHub account, two-factor authentication, and Commerce community processes described in the repository. Follow the instructions there when they change; don't copy credential steps from an outdated PDF or guide as authoritative.

          SFRA enablement (summary)

          The current repository documentation supersedes this outline. Steps that use plugin_dis, ProductImageDIS.js, or image_config_DIS.json describe the typical community layout at the time of writing; file names and locations can change.

          1. Clone the current repository from GitHub.
          2. In Administration | Sites | Manage Sites, add plugin_dis to the cartridge path before app_storefront_base. For example: app_mystorefront:plugin_dis:app_storefront_base.
          3. Configure view types and dimensions in a JSON file such as image_config_DIS.json under a cartridge you own. A typical file defines view types (for example large, medium, small, swatch), optional viewTypeMapping so smaller view types derive from a larger source, and missingImages fallbacks.
          4. Upload high-resolution source images (for example, 2400 by 2400 pixels for product hero images) in Merchant Tools | Products and Catalogs | Import & Export. Associate each image with the source view type (such as hi-res or large).
          5. In ISML, call the project's helper — for example ProductImageDIS.getImage(product, viewType, index) — and use the returned object's getURL(), alt, and title properties when writing the img tag.
          6. Verify that generated URLs use your storefront vanity domain, include /dw/image/v2/ where a transform applies, and match the sizes you configured. See Troubleshooting and migration if a request returns 4xx, a timeout, or a broken image.

          SiteGenesis enablement (summary)

          SiteGenesis projects follow the same cartridge install, but template updates are manual. Example cartridge path: app_mystorefront:plugin_dis:sitegenesis_controllers:sitegenesis_core. Update product image calls in the storefront templates the wiki lists; high-traffic templates typically include the product detail page, product tile, cart and mini-cart, checkout summary, and product email. Prefer pattern-based replacement — look for the existing image lookup and replace it with a call that goes through the helper — over line-number-specific instructions from an older implementation guide, because the base SiteGenesis templates have changed.

           
          Loading
          Salesforce Help | Article