@plentymarkets/shop-api / productImageGetters
Variable: productImageGetters ​
constproductImageGetters:object
Defined in: getters/productImageGetters.ts:99
Type Declaration ​
getCleanImageName ​
getCleanImageName: (
image) =>string
Returns the clean (filename-safe) name of an image.
Parameters ​
image ​
The image data object.
Returns ​
string
The clean image name string, or an empty string if not set.
getFirstImage ​
getFirstImage: (
product) =>ImagesData
Returns the first image from the product's all image list.
Parameters ​
product ​
The product object.
Returns ​
The first ImagesData object in the all-images list.
getImageAlternate ​
getImageAlternate: (
image) =>string
Returns the alternate text for an image.
Parameters ​
image ​
The image data object.
Returns ​
string
The alternate text string, or an empty string if names is an array or not set.
getImageHeight ​
getImageHeight: (
image) =>number
Returns the height of an image in pixels.
Parameters ​
image ​
The image data object.
Returns ​
number
The image height, or 0 if not set.
getImageName ​
getImageName: (
image) =>string
Returns the display name of an image.
Parameters ​
image ​
The image data object.
Returns ​
string
The name string, or an empty string if names is an array or not set.
getImageUrl ​
getImageUrl: (
image) =>string
Returns the full-size URL of an image.
Parameters ​
image ​
The image data object.
Returns ​
string
The image URL string, or an empty string if not set.
getImageUrlMiddle ​
getImageUrlMiddle: (
image) =>string
Returns the medium-size URL of an image.
Parameters ​
image ​
The image data object.
Returns ​
string
The medium image URL string, or an empty string if not set.
getImageUrlPreview ​
getImageUrlPreview: (
image) =>string
Returns the preview URL of an image.
Parameters ​
image ​
The image data object.
Returns ​
string
The preview image URL string, or an empty string if not set.
getImageUrlSecondPreview ​
getImageUrlSecondPreview: (
image) =>string
Returns the second preview URL of an image.
Parameters ​
image ​
The image data object.
Returns ​
string
The second preview image URL string, or an empty string if not set.
getImageWidth ​
getImageWidth: (
image) =>number
Returns the width of an image in pixels.
Parameters ​
image ​
The image data object.
Returns ​
number
The image width, or 0 if not set.