Problem with collections images

Topic summary

Users are experiencing errors when updating collection images via the collectionUpdate GraphQL mutation. The error message returned is vague: {:src=>"Error updating collection with this image"}, making troubleshooting difficult.

Key observations:

  • Creating new collections with images (collectionCreate) works correctly
  • Updating collections that already have images fails with the error
  • If the existing image is manually deleted from Shopify Admin first, then the same update mutation succeeds
  • The image URLs are valid and publicly accessible

Attempted solutions:

  • Verifying image URL accessibility and file extensions (.jpg, .png)
  • Testing with different image hosting services
  • Confirming proper mutation syntax

Current status: The issue remains unresolved. Multiple users have confirmed the same behavior, suggesting a potential bug in the collectionUpdate mutation when replacing existing images rather than adding new ones.

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

Good afternoon, community

I am encountering an issue when attempting to update the image of the collections. I am receiving the following result:

{'collectionUpdate': {'collection': None, 'userErrors': [{'field': ['image'], 'message': '{:src=>"Error updating collection with this image"}'}]}}

The JSONL object is as follows:

{"input": {"title": "test-title", "handle": "test-handle", "descriptionHtml": "test-html", "id": "gid://shopify/Collection/435910377695", "image": {"altText": "test-alt-text", "src": "<url>"}, "sortOrder": "MANUAL", "templateSuffix": "single"}}

If I delete the image from the Shopify admin panel and send the same object, it is saved correctly.

I am not sure what might be happening because the error is not very descriptive.

Has anyone else experienced this?

Thank you!

It seems the issue is with the image URL. Ensure the URL is publicly accessible and ends with a valid image extension (like .jpg or .png).

If the problem persists, try using a different image hosting service.

The URL is an example; when the collection is newly created or an image is added to it, updating it works. However, when it already has an image, it fails.

Hi David,

Are you using the collectionUpdate mutation? The mutation should look something like:

mutation UpdateCollectionImage {
  collectionUpdate(input: {
    id: "gid://shopify/Collection/1234567890", 
    image: {
      src: "https://example.com/new-image.jpg", 
      altText: "New Image Description"
    }
  }) {
    collection {
      id
      title
      image {
        src
        altText
      }
    }
    userErrors {
      field
      message
    }
  }
}

This issue still persists. I can confirm the same behavior David originally described. collectionCreate with a given image URL works fine. collectionUpdate with the same image URL fails with the error message as follows:

  • {:src=>“Error updating collection with this image”}

If you manually delete the image in the Shopify Admin and run collectionUpdate again, it works fine.