This example uses gridsome-source-shopify
Configuration
gridsome.config.js
module.exports = {
siteName: 'Gridsome',
plugins: [
{
use: 'gridsome-source-shopify',
options: {
storeName: '<my-store>',
typeName: 'Shopify',
types: [ 'Product', 'Collection' ],
perPage: 100
}
},
{
use: '@noxify/gridsome-plugin-remote-image',
options: {
typeName: 'ShopifyImage',
sourceField: 'originalSrc',
targetField: 'downloadedSrc',
targetPath: './src/assets/remoteImages'
}
}
]
}
GraphQL Query
{
allShopifyImage {
edges {
node {
originalSrc
downloadedSrc
}
}
}
}
GraphQL Result
{
"data": {
"allSanityImageAsset": {
"edges": [
{
"node": {
"originalSrc": "<shopify-remote-url>",
"downloadedSrc": {
"type": "file",
"mimeType": "image/jpeg",
//... and all other image properties
}
}
}
//...
]
}
}
}