@wocart/storefront / index / productImageSource
Function: productImageSource()
productImageSource(
product):string
The product's representative image URL, or null when it has none.
Prefers the merchant's chosen cover, falls back to the first usable gallery
image, and treats a blank url as no image at all — so a caller renders its
placeholder exactly when the product genuinely has no photograph.
Parameters
product
Returns
string
Example
Code