Arthurslog.com/@Medium/@GitHub
Slog108|Year·5
Guangzhou China
May 13th 2023
At the slow network speed, the loading speed of the interface background image can basically show all the low-resolution visual effects to the user within 1s, which increases the transition and improves the user's experience when waiting for the best visual effects to be displayed.
key point:
<img src="lowres.jpg" onLoad="this.src='highres.jpg';this.onload=new Function();" width="?" height="?">
Compressing image resources reduces file size, and appropriately numbered file names are classified and loaded according to the life cycle of the interface.
Comparison before and after compression:
Classified and numbered documents:
Always keep in mind the principle of productization
Thanks to the friends who provided valuable information