Category : optimization

I am trying to optimize images using gatsby-image-plugin. I have a HomePageBanner node with an array of images (node.gallery). I tried to loop the gallery images to createRemoteFileNode. // gatsby-node.js exports.onCreateNode = async ({ node, actions: { createNode }, store, cache, createNodeId, }) => { if (node.internal.type === "HomePageBanner") { const files = await node.gallery.reduce(async ..

Read more