1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-15 01:25:28 +01:00

keep image metadata, sharp fix

This commit is contained in:
Matthias Kretschmann 2019-11-16 00:59:10 +01:00
parent 06ea9bd8d1
commit 411099a7ed
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 12 additions and 1 deletions

View File

@ -23,7 +23,13 @@ module.exports = {
}, },
plugins: [ plugins: [
...sources, ...sources,
'gatsby-plugin-sharp', {
resolve: 'gatsby-plugin-sharp',
options: {
stripMetadata: false,
defaultQuality: 75
}
},
'gatsby-transformer-sharp', 'gatsby-transformer-sharp',
{ {
resolve: 'gatsby-transformer-remark', resolve: 'gatsby-transformer-remark',

View File

@ -8,6 +8,11 @@ const {
} = require('./gatsby/createPages') } = require('./gatsby/createPages')
const { generateJsonFeed } = require('./gatsby/feeds') const { generateJsonFeed } = require('./gatsby/feeds')
// https://github.com/gatsbyjs/gatsby/issues/6291#issuecomment-505097465
const sharp = require('sharp')
sharp.simd(false)
sharp.cache(false)
exports.onCreateNode = ({ node, actions, getNode, createNodeId }) => { exports.onCreateNode = ({ node, actions, getNode, createNodeId }) => {
// Markdown files // Markdown files
if (node.internal.type === 'MarkdownRemark') { if (node.internal.type === 'MarkdownRemark') {