-
Notifications
You must be signed in to change notification settings - Fork 8
rule img width height
Hanxing Yang edited this page Jul 10, 2016
·
1 revision
img-width-height
Attribute width
& height
of <img>
is recommended to be set, which can reduce re-layout while rendering. If found not set, it reports.
<!-- Bad -->
<img src="./sample.jpg">
<img src="./sample.jpg" width="">
<img src="./sample.jpg" height="">
<img src="./sample.jpg" width="100">
<img src="./sample.jpg" height="100">
<img src="./sample.jpg" width="100" height="">
<img src="./sample.jpg" height="100" width="">
<!-- Good -->
<img src="./sample.jpg" height="100" width="100">
-
015
Attribute
width
andheight
of<img>
found not set. -
016
Attribute
width
of<img>
found not set. -
017
Attribute
height
of<img>
found not set.
-
true
Do check / format.
-
false
Do not check / format.
No.