DEV Community

Use image-set() while supporting Firefox with dynamically loaded background images

Thor Galle on November 27, 2020

You don't need to do anything special anymore 🥳 There is full support for image-set in Firefox since version 89 (released Jun 2021). Go browser sta...
Collapse
 
zisanuzum profile image
Zisan-uzum

Hello, I'm coding footer component in react which has background image so I cant use directly tag. Also, even I&#39;m able to use style as object, then webkit doesnt exist. I changed also css file but doesnt work. My code looks like <br> <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o8tcke7zzpisdhyknjb5.jpg" alt="Image description"></p> <p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qb36ur9mdpom7wpph3rp.jpg" alt="Image description"></p>

Collapse
 
th0rgall profile image
Thor Galle

Hi! Does your background not show up? I can't really understand your problem without a reproduction. Here's a small functioning example, I hope it helps! stackblitz.com/edit/react-ts-fwysu...

It seems Firefox now supports image-set, so this article isn't so relevant anymore. No extra <style> tags necessary. I'll update it.