Documentation
Feedback
Guides
VTEX IO Apps

VTEX IO Apps
Product Images
vtex.store-components
Version: 3.115.0
Latest version: 3.178.4

This page is about version 3.115.0 of the app, which is not the most recent version. The latest stable version is 3.178.4.

ProductImages is a VTEX block responsible for rendering a product image or video.

{"base64":"  ","img":{"width":2102,"height":1084,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":409582,"url":"https://user-images.githubusercontent.com/284515/70234551-a5c8cc00-173f-11ea-87d9-9f95c79761c8.png"}}

Configuration

  1. Import the vtex.store-component app to your theme's dependencies in the manifest.json;

_10
"dependencies": {
_10
"vtex.store-components": "3.x"
_10
}

  1. Add the product-images block to any block below store.product (Product template). For example:

_15
"store.product": {
_15
"children": [
_15
"flex-layout.row#product",
_15
]
_15
},
_15
"flex-layout.row#product": {
_15
"children": [
_15
"product-images"
_15
]
_15
},
_15
"product-images": {
_15
"props": {
_15
"displayThumbnailsArrows": true
_15
}
_15
},

Prop nameTypeDescriptionDefault Value
aspectRatiostringSets the aspect ratio of the image, that is, whether the image should be square, portrait, landscape, etc. The value should follow the common aspect ratio notation i.e. two numbers separated by a colon such as 1:1 for square, 3:4 for upright portrait, or 1920:1080 for even large values)"auto"
contentOrder'videos-first' | 'images-first'Controls the order in which the images and videos are displayed.'images-first'
displayThumbnailsArrowsbooleanDisplays navigation arrows on the thumbnails media (if there are enough thumbnails for them to scroll)false
hiddenImagesstringHides images whose labels match the values listed in this prop. Intended to be used along with the product-summary-sku-selector block. You can have more information at the SKU Selector documentationskuvariation
positionEnumSet the position of the thumbnails (left or right). Only used when thumbnailsOrientation is verticalleft
showNavigationArrowsbooleanControls if the navigation arrows should appeartrue
showPaginationDotsbooleanControls if the pagination dots should appeartrue
thumbnailAspectRatiostringSets the aspect ratio of the thumbnail image; For more information about aspect ratio, check the aspectRatio prop"auto"
thumbnailMaxHeightnumberThe max height for the thumbnail imagetrue
thumbnailsOrientationEnumChoose the orientation of the thumbnails. Can be set to vertical or horizontalvertical
zoomFactornumberSets how much the zoom increases the image size (e.g. 2 will make the zoomed-in image twice as large)2
zoomModedisabled|in-place-click|in-place-hoverSets the zoom behavior.in-place-click

Customization

In order to apply CSS customizations on this and other blocks, follow the instructions given in the recipe on Using CSS Handles for store customization.

CSS Handles
carouselContainer
carouselCursorDefault
carouselGaleryCursor
carouselGaleryThumbs
carouselIconCaretLeft
carouselImagePlaceholder
carouselInconCaretRight
carouselThumbBorder
figure
image
productImagesContainer (content is deprecated)
productImagesGallerySlide
productImagesGallerySwiperContainer
productImagesThumb
productImagesThumbActive
productImagesThumbCaret
productImagesThumbsSwiperContainer
productImageTag
productVideo
swiperBullet
swiperCaret
thumbImg
video
video
videoContainer
See also
Vtex.store Components
VTEX IO Apps
VTEX App Store
VTEX IO Apps
Was this helpful?