In B2C Commerce, attach an image to a product so the storefront can show it. Assign images on the base product, and a variation product uses those images.
Before you start, define the variation attributes for the base product on the product Variations tab. This task does not create those attributes. See Variation Attribute Values.
-
Click App Launcher
, and then select .
- On the Products page, search for and open a product.
-
On the Product page General tab, click Lock.
Lock a product if you have full permission or restricted permission (permission restricted to the storefront catalog of the currently selected site). This site permission is independent from the selected locale. You can't lock a product when you have no permission at all. See Configure Product and Content Locking for B2C Commerce.
-
Scroll down the page and click the Edit button in the Images section.
The Images window opens. The Images window has three panes: Image Manager, Images, and File Browser. The Images window shows how images are structured for the product. A folder shows up to 1000 items. If it contains more, Business Manager says to use the filters above. The control is labeled Filter.
The Image Manager pane shows information based on each product type.
- Standard product. Shows two levels: view types and images.
- Base or variation product. Shows four basic levels: variation values, variation attributes, view types, and images, with multiple levels of variation attributes and values.
-
For a standard product, skip the steps that select a product attribute or open the
Variation Attributes window, and go directly to the step that assigns images. In the
Image Manager pane, select a product attribute.
The images assigned to the selected product type attribute appear in the Images pane.
- In the Image Manager pane, click Edit to open the Variation Attributes window.
-
On the Variation Attributes window, select one or more available variation
attributes and click OK.
This selection chooses which variation attributes group images, and the attributes you select here override any catalog default for this product. See Image View Types and Variants in B2C Commerce. The Image Manager pane reappears, showing the new variation attributes.
-
Assign the images.
-
In the Image Manager pane:
- For a standard product, select the product.
- For a base product, select the base product or a variation value, such as red. That is where the image is assigned. The images assigned to the selected product attribute appear in the Images pane.
-
On the File Browser pane, locate an image.
The File Browser pane appears only when the catalog image location is internal. The root directory shown in the file browser points to the catalog's static content folder as specified by catalog image settings base path. Click the open icon (>>) to open the File Browser pane.
-
For an internal image:
- If the image file isn't listed on the File Browser pane, upload it: Right-click the folder you want to upload to, click Add..., and then select the file. The name of the image appears with a box icon. Click Upload. The file uploads to the folder you right-clicked. Make sure the uploaded file name has a green check mark, which means the upload succeeded.
- Drag the file from the File Browser onto a view type in the Images pane. See Image View Types and Variants in B2C Commerce. Large, medium, small, and swatch are the default view types. A catalog can also include others, such as Hi-res or Other.
-
For an external image, do not upload a file. Click the image placeholder for
a view type. In the Path field, enter only the relative file path after the
host, such as
bar/your_image.gif. -
To replace an image, click the delete icon on the existing image, and then
assign another image.
Deleting the icon removes the image from the view only. It doesn't delete the file from the File Browser. The change takes effect when you click Save.
-
In the Image Manager pane:
- In the Images pane, specify the language to use with the Alt and Title fields.
-
In the Images pane, specify these fields.
Path. This field is mandatory and can't be null. B2C Commerce doesn't check if the path is valid. For an external image, the path is the relative path on the external host. For an internal image, the path is the file in the catalog image directory.
Note Configure a product image URL with a path up to 1800 characters. Together with the host path configured with a catalog's image settings, you can specify image URLs with up to 2056 characters. If you try to configure a longer path, Business Manager shows a warning and doesn't let you save the image settings of that product.Alt. Enter the localizable alternative text. Use the Select Language field to switch between the localized values.
Title. Enter the localizable title. Use the Select Language field to switch between the localized values.
-
Click Save.
An internal image file is stored in the catalog static content directory, which is the catalog's own static content folder. Copy that directory to the storefront with the replication task: Replication Tasks > Sites > Catalogs > (Your Catalog). See Image Storage Locations in B2C Commerce. An external image assignment stores a URL. It is not a file in that directory, so there is no image file to replicate.