Skip to content

Add "sizes" attribute inside the <Img> without adding it to the query? #27024

Answered by pindjur
jerehut asked this question in Help
Discussion options

You must be logged in to vote

gatsby image without query is useless, unless you want to add data manually.
you can pass object to fluid prop with sizes key

fluis object types

aspectRatio: PropTypes.number.isRequired, src: PropTypes.string.isRequired, srcSet: PropTypes.string.isRequired, sizes: PropTypes.string.isRequired, base64: PropTypes.string, tracedSVG: PropTypes.string, srcWebp: PropTypes.string, srcSetWebp: PropTypes.string, media: PropTypes.string, maxWidth: PropTypes.number, maxHeight: PropTypes.number

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by LekoArts
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #27024 on October 19, 2020 08:58.