diff --git a/gatsby-config.js b/gatsby-config.js index 1fd90ad..1b4546f 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -4,6 +4,7 @@ module.exports = { pathPrefix: '/gatsby-contentful-starter', plugins: [ 'gatsby-transformer-remark', + 'gatsby-transformer-sqip', 'gatsby-plugin-react-helmet', { resolve: 'gatsby-source-contentful', diff --git a/package.json b/package.json index a089a7f..5237bb0 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ }, "dependencies": { "contentful-import": "^6.2.0", + "gatsby-image": "^1.0.39", "gatsby-link": "^1.6.34", "gatsby-plugin-react-helmet": "^1.0.8", "gatsby-source-contentful": "^1.3.38", diff --git a/src/components/article-preview.js b/src/components/article-preview.js index 5377d33..64ad473 100644 --- a/src/components/article-preview.js +++ b/src/components/article-preview.js @@ -1,10 +1,18 @@ import React from 'react' import styles from './article-preview.module.css' import Link from 'gatsby-link' +import Img from 'gatsby-image' export default ({ article }) => (