Setting up the Image Viewer
You can use the Image Viewer to add images to fields for viewing in a media carousel.
The image viewer allows a Logik Admin to add featured images to supported fields that can be viewed in a media carousel. This article covers how to set up the Image Viewer in the Logik Admin and how it displays on your layout.
Supported field display types
- Static Image
- MultiSelectProductPickerGrid
- MultiSelectVisualProductPicker
- ProductPickerGrid
- VisualProductPicker
- MultiSelect picklistGrid
- SingleSelect picklistGrid
- Multiselect Visual Picker
- Visual Picker
Static images
To display the Image Viewer for a Static Image field, follow these steps:
- Open the layout where you want to add the Image Viewer.
- Hover over the field and click the gear icon.
- Open the raw value menu and add the following while including the required inputs in place of the placeholder text below.
- Click Save, and deploy the blueprint.
Raw value details for Image Viewer
Add the following to the “Raw Value” section of an image display component through the Admin UI, where Array<FeatureImage> is an array of your additional feature images in the Feature Image type format and
carouselEnabled is set to true or false.
"featureImageSettings": {
"additionalImages": Array<FeatureImage>,
"carouselEnabled": boolean
}
By default, carouselEnabled is false.
Defining a feature image
FeatureImage = {
“src”: string,
“alt”?: string,
"label"?: string,
}
Product Pickers
To display the Image Viewer for a product picker field, follow these steps:
- Select your product picker field.
- Select the Option Fields tab.
- Click + Add.
- Set the Field Type to Text.
- Set the Product List Property to Product Extended.
- Create one Text field for each image to include in the Image Viewer.Note:To display alt text or a label, additional fields for each type must be created. These fields are not required.
- Select the Bulk Actions tab.
- Click Add New Action.
- Select type Determined Action.
- Enter a Bulk Action Name.
- Select all of the fields added for your Image Viewer.
- Click Save.
- On the Bulk Actions tab, provide the URL for each image as well as text for labels and alt text if desired.
- Click Save
- Open a layout that includes the product picker field.
- Hover over the field and click the gear icon.
- Toggle Enable Image Viewer to On.
- Expand the Image Viewer Settings section.
- Select the fields created from steps 3-4 that correspond to Image URL, Alt Text, and Label.
Alt Text and Label are optional.
- Click + Add and repeat step 17 for each image that you want to include.
- Click Save, and deploy the blueprint.
Picklists
- Open the picklist field.
- Click the Picklist Extension tab.
- Click Import Data.
- Create a CSV that includes the following columns:
- value
- imageUrl
- Ensure this is a valid URL for the image to display.
- Create an imageUrl column for each image to include in the Image Viewer.
- imageLabel (optional)
- imageAltText (optional)
- Import the created CSV.
- Click Column Mapping.
- For each field added, select the mapping menu and select the column name under the Extension mapping section.
- Click Save Mapping.
- Open a layout that includes the product picker field.
- Hover over the field and click the gear icon.
- Toggle Enable Image Viewer to On.
- Expand the Image Viewer Settings section.
- Select the fields created from the picklist extension data that correspond to Image URL, Alt Text, and Label.
Alt Text and Label are optional.
- Click + Add and repeat step 13 for each image that you want to include.
- Click Save, and deploy the blueprint.
General guidelines
Ensure that the image sizes are the same for all images in a viewer. If they do not match, the thumbnails and featured image will not align properly.
Add images in the order you want them to display. Images will display from the Image Viewer settings from top to bottom. The name of the field does not affect the display order.
Use images with a high enough resolution to properly fill the window. Low resolution images will be expanded in size to fit the window and will not look good when select as the featured image.
For optimal performance, avoid large or high resolution images since that will impact the render time for the image viewer.
Image Viewer display
On a layout with a field that includes an image view, a user can hover over an image to see the expand icon.
Once clicked, the image view will open in a dialog box.
A user can move between images with the arrow buttons or by clicking the thumbnails below the feature image. This carousel displays any label and alt text if provided. A user can close the dialog box by clicking outside it or by clicking X in the top right.