Re: Where can i get the file_reference for my images?

Where can i get the file_reference for my images?

2 0 5

We want to mange our metafields via a inventory management software. But when trying to upload a file_reference type, the connector gives back an error.

The Shopify server responded with status 422 and the following error: "value => must be a file reference string.


So i need somthing like this: gid://shopify/ MediaImage/123.

But where can i get the vaule to my image? I can only see the URL.

Thanks for Help

Replies 3 (3)

Shopify Partner
6 0 3

Up ?

Shopify Partner
8 0 0

Shopify Partner
3 0 0

You can use the following GraphQL query:

  files(first: 5, query: "filename:'yourfilename'" ) {
    edges {
      node {

But this query returns multiple files if they have similar names. Unfortunately there is no query parameter like a url or something.

You can click on Show filters under the query argument to see the options.