You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* initial changes
* Update packages/gatsby-plugin-image/README.md
Co-authored-by: Matt Kane <[email protected]>
* remove compat
* update types
* update tests
* more test fixes
* intermediate test naming
* Update packages/gatsby-plugin-image/README.md
Co-authored-by: Matt Kane <[email protected]>
* conflict
Co-authored-by: Matt Kane <[email protected]>
Copy file name to clipboardExpand all lines: packages/gatsby-plugin-image/README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -272,7 +272,7 @@ devices with widths stretching from smartphone to wide desktop monitors.
272
272
273
273
To decide between the two, ask yourself: "do I know what the exact size of this image
274
274
will be?" If yes, it's "fixed". If no and its width and/or height need to
275
-
vary depending on the size of the screen, then it's "fluid". If you want it to shrink
275
+
vary depending on the size of the screen, then it's "fullWidth". If you want it to shrink
276
276
to fit on smaller screens, but not to expand larger than a maximum, then use "constrained"
277
277
278
278
In Gatsby's GraphQL implementation, you specify the type of image with the `layout` argument
@@ -289,7 +289,7 @@ In Gatsby's GraphQL implementation, you specify the type of image with the `layo
289
289
# GraphQL resolver
290
290
291
291
We have added a new `gatsbyImageData` resolver to the `ImageSharp` node. Unlike the existing `fixed` and `fluid` resolvers, this returns a
292
-
JSON type, meaning you don't specify the individual fields, but are instead given the whole object. This is because the object is then passed in to the `<GatsbyImage>` component. The API is like this:
292
+
JSON type, meaning you don't specify the individual fields, but are instead given the whole object. This is because the object is then passed into the `<GatsbyImage>` component. The API is like this:
@@ -326,9 +326,9 @@ These arguments can be passed to the `gatsbyImageData()` resolver:
326
326
-**layout**: The layout for the image.
327
327
-`CONSTRAINED`: (default) Resizes to fit its container, up to a maximum width, at which point it will remain fixed in size.
328
328
-`FIXED`: A static image size, that does not resize according to the screen width
329
-
-`FLUID`: The image resizes to fit its container. Pass a "sizes" option if it isn't going to be the full width of the screen.
329
+
-`FULL_WIDTH`: The image resizes to fit its container. Pass a "sizes" option if it isn't going to be the full width of the screen.
330
330
-**outputPixelDensities**: A list of image pixel densities to generate, for high-resolution (retina) screens. It will never generate images larger than the source, and will always include a 1x image.
331
-
Default is `[ 0.25, 0.5, 1, 2 ]`, for fluid/constrained images, and `[ 1, 2 ]` for fixed.
331
+
Default is `[ 0.25, 0.5, 1, 2 ]`, for fullWidth/constrained images, and `[ 1, 2 ]` for fixed.
332
332
-**sizes**: The "[sizes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images)" attribute, passed to the `<img>` tag. This describes the display size of the image. This does not affect the generated images, but is used by the browser to decide which images to download. You can leave this blank for fixed images, or if the responsive image container will be the full width of the screen. In these cases we will generate an appropriate value. If, however, you are generating responsive images that are not the full width of the screen, you should provide a sizes property for best performance. You can alternatively pass this value to the component.
333
333
-**formats**: an array of file formats to generate. The default is `[AUTO, WEBP]`, which means it will generate images in the same format as the source image, as well as in the next-generation [WebP](https://developers.google.com/speed/webp) format. We strongly recommend you do not change this option, as doing so will affect performance scores.
334
334
-**quality**: The default quality. This is overridden by any format-specific options
0 commit comments