Skip to content

Releases: imgix/react-imgix

v9.1.5

02 Jun 15:51
Compare
Choose a tag to compare

9.1.5 (2021-06-02)

v9.1.4

28 May 23:30
Compare
Choose a tag to compare

9.1.4 (2021-05-28)

Bug Fixes

  • constants out of sync with versions (a977614)

v9.1.3

28 May 14:57
Compare
Choose a tag to compare

9.1.3 (2021-05-28)

Bug Fixes

  • 789: ensure children passed to background component update (643b809)

v9.1.2

20 May 08:54
Compare
Choose a tag to compare

9.1.2 (2021-05-20)

v9.1.1

24 Apr 13:26
Compare
Choose a tag to compare

9.1.1 (2021-04-24)

Bug Fixes

  • re-render Background only if a larger image is needed (#782) (53bb104), closes #763

v9.1.0

23 Apr 07:51
Compare
Choose a tag to compare

9.1.0 (2021-04-23)

Features

9.0.3

19 Nov 01:41
Compare
Choose a tag to compare
  • chore(deps): sync dependency updates (fixes #565)

9.0.2

02 Apr 01:04
Compare
Choose a tag to compare
  • background: fortify hasDOMDimensions check for null height (#592) (c7fb86e)

9.0.1

22 Nov 23:19
Compare
Choose a tag to compare
  • fix: prevent overwriting htmlAttributes.ref (#496) (e15e1b2)

9.0.0

01 Nov 23:33
Compare
Choose a tag to compare

This release brings the react-imgix API more in-line with that of imgix's rendering service.

The largest change users will notice is that this project's component will no longer generate a default fit=crop parameter. The original intention behind this was that generated images would maintain aspect ratio when at least one of the dimensions were specified. However, the default imgix API behavior sets fit=clip, which is now reflected in this project.
Although this may not cause breaking changes for all users, it can result in unusual rendered image behavior in some cases. As such, we would rather err on the side of caution and provide users the ability to opt in to these changes via a major release.

If you are currently relying on the default generation of fit=crop when rendering images, you will now have to manually specify it when invoking the component:

<Imgix
	src="https://assets.imgix.net/examples/pione.jpg"
  sizes="100vw"
  imgixParams={{ fit: "crop" }}
/>

The other major change relates to how the component determines an image's aspect ratio. Instead of appending a calculated height h= value based on specified dimensions, the URL string will now be built using the imgix aspect ratio parameter ar=. Luckily, the interface for specifying an aspect ratio is no different from before. However, users will have to pass in the fit=crop parameter in order for it to take effect:

<Imgix
  src="http://assets.imgix.net/examples/pione.jpg"
  width={400}
	imgixParams={{ ar: "2:1", fit: "crop" }}
/>

Refactor

  • refactor: use ar parameter instead of calculating aspect ratio (#462) (fbe8082)
  • refactor: replace findDOMNode with callback refs (#476) (db3a1d7)

Bug Fixes

Chore

  • chore(clean): remove all deprecatedProps and types (#483) (d036132)