- when an image is inserted in the html as in the following from the index.html
<img src="./assets/image-hero.webp" alt="" class="img" />
, Lighthouse indicates that anImage elements do not have explicit width and height
. A link for further details to the reasons why the sizes are important is given Images without dimensions #. The main reason behind this approach is to allow browsers to reserve the correct amount of space in the document whilst the image is loading - the illustration is done using
display: flex
where the mobile has a column direction which is changed to row in medium to desktop.
-
Notifications
You must be signed in to change notification settings - Fork 0
queseri/responsive-img
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published