addProductMedia( )


Adds media items by ID to a product.

The addProductMedia() function returns a Promise that resolves when the adding of the media (images or videos) to a product has started.

Limitation The URL is not validated and no event is triggered to indicate if the media was added successfully.

Method Declaration
Copy
Method Parameters
productIdstringRequired

Product ID.


mediaArray<Media>Required

Sources of media items already uploaded to the Wix site.

Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?