product Variant Append Media
Requires access scope. Also: The user must have a permission to append media to variants.
Appends existing media from a product to specific variants of that product, creating associations between media files and particular product options. This allows different variants to showcase relevant images or videos.
For example, a t-shirt product might have color variants where each color variant displays only the images showing that specific color, helping customers see exactly what they're purchasing.
Use to:
- Associate specific images with product variants for accurate display
- Build variant-specific media management in product interfaces
- Implement automated media assignment based on variant attributes
The operation links existing product media to variants without duplicating files, maintaining efficient media storage while enabling variant-specific displays.
Learn more about product variants.
Arguments
- Anchor to productIdproduct•ID!
Id required Specifies the product associated to the media.
- Anchor to variantMediavariant•[Product
Media Variant Append Media Input!]! required A list of pairs of variants and media to be attached to the variants.
- Anchor to productproduct•Product
The product associated with the variants and media.
- Anchor to productVariantsproduct•[Product
Variants Variant!] The product variants that were updated.
- Anchor to userErrorsuser•[Media
Errors User Error!]! non-null The list of errors that occurred from executing the mutation.