Provides various official and user-released code examples and code reference. You are welcome to exchange and learn big pictures, which especially affect loading speed and poor user experience. Therefore, I would like to share the acceleration plug-in Antimoderate. js with you. The principle is to use canvans in html5 to process images, load thumbnails first, and blur them. When a large image is downloaded, the large image display is loaded, which greatly speeds up the page opening.
Prepare a large image. Of course, it is as big as possible, which may be several hundred KB or even upper MB. We also create a thumbnail, which is very small and may be about 1 kb. We can convert this thumbnail into a Base64 image, as shown in the following code, define the data-antimoderate-idata attribute value as a base64 image.
Baidu
Fast loading image Demo: http://www.sucaihuo.com/php/812.html
Php?antimoderate.js large image optimization. Zip (217.24 KB download: 32 times)
AD: truly free, domain name + VM + enterprise mailbox = 0 RMB