Hey team,
I’ve seen a lot of elements (galleries, carousel, sliders, etc…) render the images as a CSS background-image of a
Thanks!
Maxime
Hey team,
I’ve seen a lot of elements (galleries, carousel, sliders, etc…) render the images as a CSS background-image of a
Thanks!
Maxime
I second this, using background images is really bad practice for a lot of use cases because:
I know it’s a quick shortcut to build cards and use text overlays, but it can easily be done with img tag and absolute positionning
I’d rather see them using the objec-fit:cover property rather than the position:absolute hack
@timmse Yes, I also came across this one today. Due to SEO, background images are not the best way for galleries, because we can’t use SEO alt tags on background image.
Better would be to use NATIVE images and use object-fit …
Please consider this anytime soon! Thank you!
True. Due to SEO concerns, I used an image + object fit for my background images.