Skip to content

Releases: datocms/react-datocms

v4.0.2

11 Nov 15:24
Compare
Choose a tag to compare
  • Make both height and aspectRatio optional (at least one must be present though!) a41ddf0
  • Get rid of transitions on placeholder c7624b2

v4.0.1...v4.0.2

v4.0.1

11 Nov 14:48
Compare
Choose a tag to compare
  • Fix issue on placeholder with layout="fill" 03e336b

v4.0.0...v4.0.1

v4.0.0

11 Nov 13:54
Compare
Choose a tag to compare

Changes to component

You can now avoid requesting srcSet in the responsiveImage() GraphQL query, as if it's missing, the component will build it internally. This can reduce the overall GraphQL response significantly.

Basically, with v4 your responsiveImage queries can be reduced down to:

responsiveImage(imgixParams: { auto: format }) {
  src width height alt base64
}

New props for Image component:

  • priority: When true, the image will be considered high priority. Lazy loading is automatically disabled, and fetchpriority="high" is added to the image. You should use the priority property on any image detected as the Largest Contentful Paint (LCP) element. It may be appropriate to have multiple priority images, as different images may be the LCP element for different viewport sizes. Should only be used when the image is visible above the fold.
  • sizes: If you're using this prop, you can avoid requesting sizes in the responsiveImage() query (it will reduce the overall GraphQL response size).
  • srcSetCandidates: If you're not requesting srcSet in the responsiveImage() GraphQL query, srcSetCandidates will be used to generate the different srcset candidate strings at various widths. Default candidates are: [0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4].

v3.1.4...v4.0.0

v3.1.4

31 Oct 13:20
Compare
Choose a tag to compare

v3.1.3...v3.1.4

v3.1.3

05 Oct 07:55
Compare
Choose a tag to compare

v3.1.1

09 Sep 10:39
Compare
Choose a tag to compare
  • Add fuzzySearch parameter 9c2590c

v3.1.0...v3.1.1

v3.1.0

22 Aug 13:20
Compare
Choose a tag to compare

v3.0.15...v3.1.0

v3.0.15

10 Jun 09:51
Compare
Choose a tag to compare

v3.0.14...v3.0.15

v3.0.14

07 Jun 17:16
Compare
Choose a tag to compare

v3.0.13

07 Jun 17:12
Compare
Choose a tag to compare