From f94bcbb432d4845393f27c6ee9b361290314371e Mon Sep 17 00:00:00 2001 From: Jonas Braathen Date: Sat, 9 Mar 2019 12:25:29 +0100 Subject: [PATCH] Set max height for post list images --- src/components/PostList.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/PostList.js b/src/components/PostList.js index d242d56..86aa168 100644 --- a/src/components/PostList.js +++ b/src/components/PostList.js @@ -47,6 +47,13 @@ PostList.propTypes = { } export const pageQuery = graphql` + fragment PostListImage on File { + childImageSharp { + fluid(maxWidth: 800, maxHeight: 600) { + ...GatsbyImageSharpFluid + } + } + } fragment PostListFields on wordpress__POST { id path @@ -62,7 +69,7 @@ export const pageQuery = graphql` date(formatString: "MMMM DD, YYYY") featured_media { localFile { - ...FluidImage + ...PostListImage } } }