productVaraintsCreate mediaSrc Qustions

Topic summary

A user is experiencing issues registering product images when using the productCreate mutation. Despite including image paths in the variants > mediaSrc field, the images fail to register.

Technical Details:

  • The mutation includes properly formatted S3 bucket URLs for images
  • Images are specified in both the main images array and within variants > mediaSrc
  • The JSON payload appears structurally valid with product details, variants (COLOR/SIZE options), metafields, collections, and pricing

Current Status:
The issue remains unresolved with no responses yet. The user is seeking clarification on why the mediaSrc field isn’t working as expected for variant-level image assignment.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

When registering a product with product Create, the image cannot be registered even though the image path is attached to variables>mediaSrc. I don’t know why.

{
“input”: {
“bodyHtml”: “TEST444”,
“collectionsToJoin”: [
“gid://shopify/Collection/459616092460”
],
“collectionsToLeave”: null,
“descriptionHtml”: “TEST333”,
“images”: [
{
“altText”: “”,
“src”: “https://sellpick-bucket.s3.ap-northeast-2.amazonaws.com/dev/upload/file/BACD0200/weap0n77/191655/20230405173009/51494b66b20eaec11fe5.jpg
}
],
“metafields”: [
{
“description”: “”,
“key”: “use1”,
“namespace”: “custom”,
“type”: “multi_line_text_field”,
“value”: “META11111”
}
],
“options”: [
“COLOR”,“SIZE”
],
“variants”: [
{
“compareAtPrice”: “200”,
“inventoryQuantities”: [
{
“availableQuantity”: 11,
“locationId”: “gid://shopify/Location/91036582188”
}
],
“options”: [
“RED”,“100”
],
“mediaSrc”: “https://sellpick-bucket.s3.ap-northeast-2.amazonaws.com/dev/upload/file/BACD0420/weap0n77/191655/20231025112703/6a0e3f87ff3d080e4a97.png”,
“position”: 1,
“price”: “100”,
“requiresComponents”: true,
“requiresShipping”: true,
“sku”: “SKU123123”,
“taxable”: true
}
],
“productCategory”: {
“productTaxonomyNodeId”: “gid://shopify/ProductTaxonomyNode/352”
},
“productType”: “Shoes”,
“status”: “ACTIVE”,
“tags”: [
“tag1”,“tag2”
],
“title”: “two options test11”,
“productPublications”: [
{
“channelId”: “gid://shopify/Channel/199319355692”,
“publicationId”: “gid://shopify/Publication/199319355692”
}
]
}
}

1 Like