File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
packages/gatsby-plugin-sharp/src Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 66 "author" :
" Kyle Mathews <[email protected] >" ,
77 "dependencies" : {
88 "gatsby" : " ^1.9.52" ,
9- "gatsby-image" : " ^1.0.5 " ,
9+ "gatsby-image" : " ^1.0.39 " ,
1010 "gatsby-link" : " ^1.6.20" ,
1111 "gatsby-plugin-glamor" : " ^1.6.8" ,
1212 "gatsby-plugin-google-analytics" : " ^1.0.8" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as PropTypes from "prop-types"
22import React from "react"
33import HeartIcon from "react-icons/lib/fa/heart"
44import Link from "gatsby-link"
5+ import Img from "gatsby-image"
56
67import { rhythm , scale } from "../utils/typography"
78import presets from "../utils/presets"
@@ -42,7 +43,6 @@ class Post extends React.Component {
4243 } }
4344 css = { {
4445 display : `block` ,
45- backgroundColor : `lightgray` ,
4646 flex : `1 0 0%` ,
4747 marginRight : rhythm ( 1 / 8 ) ,
4848 width : `100%` ,
@@ -61,14 +61,11 @@ class Post extends React.Component {
6161 flexDirection : `column` ,
6262 flexShrink : 0 ,
6363 position : `relative` ,
64- paddingBottom : `100%` ,
6564 overflow : `hidden` ,
6665 } }
6766 >
68- < img
69- src = { small . src }
70- srcSet = { small . srcSet }
71- sizes = "(min-width: 960px) 292px, 33vw"
67+ < Img
68+ sizes = { { ...small } }
7269 css = { {
7370 margin : 0 ,
7471 height : `100%` ,
@@ -133,9 +130,12 @@ export const postFragment = graphql`
133130 likes
134131 smallImage: image {
135132 childImageSharp {
136- small: responsiveSizes (maxWidth: 292, maxHeight: 292) {
133+ small: sizes (maxWidth: 292, maxHeight: 292) {
137134 src
138135 srcSet
136+ aspectRatio
137+ sizes
138+ tracedSVG
139139 }
140140 }
141141 }
Original file line number Diff line number Diff line change @@ -757,7 +757,7 @@ function encodeOptimizedSVGDataUri(svgString) {
757757
758758const optimize = svg => {
759759 const SVGO = require ( `svgo` )
760- const svgo = new SVGO ( { multipass : true , floatPrecision : 1 } )
760+ const svgo = new SVGO ( { multipass : true , floatPrecision : 0 } )
761761 return new Promise ( ( resolve , reject ) => {
762762 svgo . optimize ( svg , ( { data } ) => resolve ( data ) )
763763 } )
You can’t perform that action at this time.
0 commit comments