code: function getExampleThumbnails({ allFile, allImageSharp }) {
    // this function associates the path of an original image
    // with the public url of a thumbnail, resized server side by imageSharp.
    if (
      !allFile ||
      !allFile.edges ||
      !allFile.edges.length ||
      !allImageSharp ||
      !allImageSharp.edges ||
      !allImageSharp.edges.length
    ) {
      log.log({ color: COLOR.YELLOW, priority: 1 }, `No thumbnails created.`)();
      return {};
    }
    // in a first pass, we create a lookup - original path to internal gatsby node id.
    /* eslint-disable no-param-reassign */
    const idLookup = allFile.edges.reduce((lookup, { node }) => {
      lookup[node.id] = node.relativePath;
      return lookup;
    }, {});
  
    // in a second path, we associate each thumbnail with the path of the original
    // image, using the node id of this original image and the lookup
    // we just created.
  
    const pathLookup = allImageSharp.edges.reduce((lookup, { node }) => {
      const originalImageId = node.parent.id;
      const originalImagePath = idLookup[originalImageId];
      lookup[originalImagePath] = node.resize.src;
      return lookup;
    }, {});
  
    /* eslint-enable no-param-reassign */
    return pathLookup;
  }
docs: assert(CONFIG.EXAMPLES_GALLERY_TEMPLATE_URL && EXAMPLE_TEMPLATE_URL); Exracts thumbnails from the sharp query