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
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:
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 parameterar=. 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:
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
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
deps: update all deps, move to react 16 for testing (#120) (99f1f14)
BREAKING CHANGES
deps: only React v16 is now actively supported
v6.0.2 / 2017-10-26
Add single quotes to background url. (#119) - thanks @nickhavenly
v6.0.0 / 2017-05-05
Breaking Changes
React 0.14 no longer supported. This react-imgix version drops official support for React 0.14. This package will probably still work with 0.14, but we will not accept bugs or issues relating to React 0.14.
bg prop removed. This prop was deprecated in the past, and has now been removed. Please upgrade all usages to: type='bg'.
Important Note
Since this package now uses prop-types, when using a React version below 15.5, there will be duplicate propTypes. To fix this, please upgrade to 15.5, which no longer exports React.PropTypes.
Thanks
A massive thanks for @modosc for helping with this release, and upgrading to React 15.5.
fix React 15.5 warnings (#104) - @modosc
pull in prop-types from a separate module, fix sinon deprecation warning (#102)
Update travis config
Run prettier on code
Change prettier to 120 line length
Use prettier rather than standard
Add prettier
Update deps
v5.4.0 / 2017-04-06
add onMounted callback with access to underlying node (#94)
v5.3.0 / 2017-03-24
Background Size adjustments (#89)
fix typo - deprecated warning (#81)
v5.2.0 / 2016-12-02
Picture element (#60) - thanks @modosc
v5.1.0 / 2016-11-15
Added:crop prop to override crop url parameter #57 - @rbliss