![]() ![]() Note that like the old fluid layout, fullWidth images will expand to fit the width of their container, even if that width is larger than the source image. In most cases you will not need to provide these, as there are default values that work for most sites. Instead of passing something like maxWidth, it takes an array called breakpoints that will generate images designed for those screen sizes. This image is designed to be used for things like hero images that span the full width of the screen, and generates image sizes accordingly. The first is an image type called fullWidth. The fluid image type has been deprecated in favor of two alternatives. In addition to the syntax changes for using gatsby-plugin-image, there are also changes to the API that affect the resolver arguments (and the new StaticImage component). ![]() The import name is potentially different, and the query result is also different. ![]() Other changes to the available argument structure are in the section on API changes. fluid, WebP generation, and placeholder type - are passed as arguments to the resolver. Previous configuration options - such as fixed vs. The fragment is removed in favor of gatsbyImageData, which is used for all images. Instead, things like layout and format are passed as arguments to the resolver. With gatsby-plugin-image, the component is now a named export. Previously, GatsbyImage was the default export from gatsby-image. We’ve provided a codemod to help you migrate, but this section will explain the changes. The new plugin requires significant syntax changes.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |