Skip to content

Commit

Permalink
webp back, log keys
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeigs committed Jan 29, 2024
1 parent b62450a commit 91c870e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions plugins/gatsby-source-snooty-prod/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ exports.sourceNodes = async ({ actions, createContentDigest, createNodeId }) =>
);

if (gatsbyImages?.length) {
console.log(
'KEYS ',
gatsbyImages.map((asset) => asset.key)
);
createNode({
children: [],
id: createNodeId(`page-images-${slug}`),
Expand Down
2 changes: 1 addition & 1 deletion src/components/DocumentBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const query = graphql`
slug
images {
childImageSharp {
gatsbyImageData(layout: CONSTRAINED, placeholder: NONE)
gatsbyImageData(layout: CONSTRAINED, formats: [WEBP], placeholder: NONE)
}
relativePath
}
Expand Down
1 change: 1 addition & 0 deletions src/context/image-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default ImageContext;

const ImageContextProvider = ({ images, children }) => {
const imageByPath = {};
console.log('IMAGES in Context ', images);
for (const image of images) {
if (image?.relativePath) {
console.log('image rel Path ', image.relativePath);
Expand Down

0 comments on commit 91c870e

Please sign in to comment.