Links
Comment on page
🪄

Update Primary Image

Use this method to update an item's primary image.

Usage in your script

First Tab
TypeScript
const updatedItem = await alturaItem.updatePrimaryImage(IMAGE_INDEX);
const updatedItem IAlturaItem = await alturaItem.updatePrimaryImage(IMAGE_INDEX);
Remember, imageIndex starts at 0 and not 1. Therefore the highest imageIndex is imageCount - 1

Parameters

Parameter
Type
Required
Description
imageIndex
Integer
Yes
The index of the image you wish to change to