-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test blog meta image path update #3161
Conversation
This reverts commit 66f33f0.
// nodes.map(async node => { | ||
// const imagePath = node.picture.gatsbyImageData.images.fallback.src | ||
// const date = node.date.slice(0, 10) | ||
// return copyFile( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commented out my original solution which involved copying over the images created by gatsby-plugin-image
to a new place in the public
folder. At the time copyFile
runs, gatsby hasn't created all of the images yet so you get the can't find directory or file
error on some of the images. Maybe we could look into having Gatsby creating the images earlier, guaranteeing they are already built when we run the copyFile
code?
await Promise.all( | ||
nodes.map(async node => { | ||
const imagePath = node.picture.fields.sourcePath | ||
return Jimp.read(path.join(__dirname, 'static', 'uploads', imagePath)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I couldn't use copyFile
, I used Jimp
to take the main images and copy them over to the public folder. But if anyone has any ideas on getting the commented solution to work, it would be probably be better to just use gatsby-plugin-image
and not use Jimp
at all.
Closing in favor of #3206 |
Testing solution for #1238