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
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
@@ -111,15 +111,15 @@ const width = 300
111
111
112
112
### API
113
113
114
-
The only required prop is `src`. The default type is `fixed`. The other props match those of [the new GatsbyImage component](#gatsbyimage). You can also pass in options which are forwarded to [`gatsbyImageData`](#graphql-resolver).
114
+
The only required prop is `src`. The default type is `constrained`. The other props match those of [the new GatsbyImage component](#gatsbyimage). You can also pass in options which are forwarded to [`gatsbyImageData`](#graphql-resolver).
115
115
116
116
## GatsbyImage
117
117
118
118
Speedy, optimized images without the work.
119
119
120
120
GatsbyImage is a React component specially designed to give your users a great image experience. It combines speed and best practices.
121
121
122
-
Note: GatsbyImage is not a drop-in replacement for `<img>`. It's optimized for fixed width/height images and images that stretch the full-width of a container. You can also build your own GatsbyImage component with the utilities we export from this package.
122
+
Note: GatsbyImage is not a drop-in replacement for `<img>`. It's optimized for fixed width/height images and images that stretch the full-width of a container.
123
123
124
124
## Table of Contents
125
125
@@ -329,9 +329,9 @@ These arguments can be passed to the `gatsbyImageData()` resolver:
329
329
-`NONE`: no placeholder. Set "background" to use a fixed background color.
330
330
-`DOMINANT_COLOR`: a solid color, calculated from the dominant color of the image.
331
331
-**layout**: The layout for the image.
332
-
-`FIXED`: (default) A static image size, that does not resize according to the screen width
332
+
-`CONSTRAINED`: (default) Resizes to fit its container, up to a maximum width, at which point it will remain fixed in size.
333
+
-`FIXED`: A static image size, that does not resize according to the screen width
333
334
-`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.
334
-
-`CONSTRAINED`: Resizes to fit its container, up to a maximum width, at which point it will remain fixed in size.
335
335
-**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.
336
336
Default is `[ 0.25, 0.5, 1, 2 ]`, for fluid/constrained images, and `[ 1, 2 ]` for fixed. In this case, an image with a fluid layout and maxWidth = 400 would generate images at 100, 200, 400 and 800px wide
337
337
-**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.
0 commit comments