gatsby image sharp code example
Example 1: gatsby image
const path = require(`path`)
module.exports = {
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: path.join(__dirname, `src`, `images`),
},
},
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,
],
}
Example 2: gatsbyjs image sharp
npm install --save gatsby-transformer-sharp gatsby-plugin-sharp