-
Notifications
You must be signed in to change notification settings - Fork 96
Preprocess Image for performance boost
Daybrush edited this page Jun 12, 2018
·
1 revision
The size of the image can not be known until the image is loaded. Therefore, you can not layout items because you can not know the size of the item until you know the size of the image.
If you set the image's width and height in advance, you can layout faster before the image loads.
<img src="..." alt="img" data-width="100" data-height="200"/>
- You only need to add
data-width
anddata-height
attributes.