Skip to main content

Type Alias: GetProductThumbnail

GetProductThumbnail = (productId, thumbConfig) => Promise<string>

Function

Generates a thumbnail image URL for a product.

This method creates a URL to a product thumbnail, either using a static pre-defined image or dynamically generating one based on the current configuration. The thumbnail can be customized with specific configuration codes, sizes, and background colors.

Product thumbnails are essential for product listings, carousels, saved configurations, and anywhere products need to be represented visually in a compact format.

Parameters​

productId​

string

ID of the product to generate a thumbnail for

thumbConfig​

ProductThumb

Thumbnail configuration object defining image type and source

Returns​

Promise<string>

A promise resolving to the URL of the generated thumbnail, or empty string if unsuccessful

Example​

// Get a default thumbnail for a product
const thumbUrl = await window.mimeeqApp.actions.getProductThumbnail(
'prod_123', // Product ID
product.standardImage // Thumbnail configuration
);

// Get a custom thumbnail for a specific configuration
const configThumbUrl = await window.mimeeqApp.actions.getProductThumbnail(
'prod_123', // Product ID
product.standardImage, // Thumbnail configuration
);