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:
parent
06ea9bd8d1
commit
411099a7ed
@ -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',
|
||||||
|
@ -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') {
|
||||||
|
Loading…
Reference in New Issue
Block a user