I want to add an image for each variable.
I added an image URL to imageSrc, but I can’t actually add an image. What should I do?
mutation productVariantsBulkCreate($productId: ID!, $variants: [ProductVariantsBulkInput!]!) {
productVariantsBulkCreate(productId: $productId, variants: $variants) {
product {
id
}
productVariants {
id
image{
url
}
metafields(first: 250) {
edges {
node {
namespace
key
value
}
}
}
}
userErrors {
field
message
}
}
}
{
"productId": "gid://shopify/Product/8730477592876",
"variants": [
{
"options": [
"Fashionable6"
],
"sku": "SKU001",
"price": 114.99,
"inventoryPolicy": "DENY",
"inventoryQuantities": {
"availableQuantity": 25,
"locationId": "gid://shopify/Location/91036582188"
},
"imageSrc" : "https://sellpick-bucket.s3.ap-northeast-2.amazonaws.com/weap0n77/SSGCOM/GDS002054/894833a74460ed37e5e32b5826a92397/7a664f1435b2137b86fb833e6142a881.jpg"
},
{
"options": [
"Rugged6"
],
"sku": "SKU002",
"price": 114.99,
"inventoryPolicy": "DENY",
"inventoryQuantities": {
"availableQuantity": 25,
"locationId": "gid://shopify/Location/91036582188"
},
"imageSrc" : "https://sellpick-bucket.s3.ap-northeast-2.amazonaws.com/weap0n77/SSGCOM/GDS002054/894833a74460ed37e5e32b5826a92397/7a664f1435b2137b86fb833e6142a881.jpg"
}
]
}
