react-imgix v8.0.0 Release Notes

Release Date: 2018-08-15 // over 5 years ago
  • ๐Ÿš€ This is a very large update to this library with a lot of breaking changes. We apologise for any issues this may cause, and we have tried to reduce the number of breaking changes. We have also worked to batch up all these changes into one release to reduce its impacts. We do not plan on making breaking changes for a while after this, and will be focussed on adding features.

    ๐Ÿšš The largest change in this major version bump is the move to width-based srcSet and sizes for responsiveness. This has a host of benefits, including better server rendering, better responsiveness, less potential for bugs, and perfomance improvements. This does mean that the old fitting-to-container-size behaviour has been removed. If this is necessary, an example of how this can be achieved can be found [here](./examples/fit-to-size-of-container.md)

    โฌ†๏ธ Please see the Upgrade Guide for more details on what to change.

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  warn the user when no passed as a child to fixes #90 (#151) (aab9358)

    ๐Ÿ”‹ Features

    • ๐Ÿ“ฑ implement responsiveness with srcSet and sizes (#159) (fa68df6), closes #158
    • โฌ‡๏ธ reduce props API surface area (#162) (9fb0cb9)
    • ๐Ÿ”จ refactor picture and source behaviour into different components (#163) (64d9b8a)

    ๐Ÿ’ฅ BREAKING CHANGES

    • picture and source types have been changed to components.
    • 0๏ธโƒฃ faces is no longer set by default.
    • srcSet behaviour has changed to use sizes + srcSets
    • ๐Ÿšš type=bg has been removed
    • ๐Ÿšš the following props have been removed: aggressiveLoad, component, fluid, precision, defaultHeight, defaultWidth
    • generateSrcSet has been changed to disableSrcSet
    • A fallback image will no longer be created when using react-imgix in picture mode