mohitk05 / react-insta-stories

A React component for Instagram like stories
https://mohitk05.github.io/react-insta-stories/
MIT License
1.37k stars 247 forks source link

`background-image` CSS attribute vs `<img/>` element #319

Open CarcajadaArtificial opened 2 months ago

CarcajadaArtificial commented 2 months ago

Hi everyone,

I wanted to know if there's a way to add images using the CSS background-image attribute instead of <img/> elements. I find that <img/> elements have limitations and don't provide the flexibility needed for full manipulation, especially when it comes to styling and responsiveness.

Using CSS for images could offer more control over properties like positioning, scaling, and layering, but I’m not sure how to implement this effectively or if it's supported in our current setup.

Has anyone explored this approach or have suggestions on how to do this? Any insights or examples would be greatly appreciated!

Thanks!