imgix / react-imgix

React component to display imgix images

Home Page:https://www.npmjs.com/package/react-imgix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add background mode back

frederickfogerty opened this issue · comments

Before you submit:

Is your feature request related to a problem? Please describe.
I would like to set images as the background image of components such as div so I can place other items within this element.

Describe the solution you'd like

<Imgix type="bg" src="..."><Heading>Blog Header</Heading></Imgix>

We could make this work by requiring width and height to be specified, as determining this ourselves is too error prone.

This is essential for our project. So we need to use an old version of react-imgix currently. Could use object-fit in newer projects, but when we need to support older browsers, it's not possible.

Due to the community desire to have this reimplemented, this is happening! I'll post any updates here when I have them 👍

We're getting very close now! Track the progress over in #236.

image

🎉 Released in 8.5.0. Thanks to everyone for their support and @adamraider for contributing to the PR!