Why does <Image> use CSS background-image and <img>? #1908
-
Hey there 👋 First of all thank you for all the effort here. But we discovered one thing, I couldn't quite find the reason for: If anyone could give a short explanation that would make a curious man happy 🙂 Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@okwast I think this is done to support
Found the above comment in the source code 😅 |
Beta Was this translation helpful? Give feedback.
@okwast I think this is done to support
resizeMode
property.img
tag is added for accessibility reasons. It renders on top of the background image, so we can get the alt attribute and browsers can show the image context menu.Found the above comment in the source code 😅