Solve the problem of loading too many images on a single page. the loading of a single image is too slow. php

Source: Internet
Author: User
Solve the problem of too many images to be loaded on a single page. the slow loading of a single image is too large. I searched the internet and said that lazyload delayed loading, and I tried it well. Images are automatically loaded only in the visible area of the browser. However, if a full screen image is loaded in the browsing area, it is still very slow. I mean the width and size of a single image are very large. Is there a good solution, for example, loading a large image in the red area, it will be slow & nbsp; solve the problem of loading too many images on a single page.
Rt. I searched the internet and said lazyload delayed loading. the test worked well. Images are automatically loaded only in the visible area of the browser. However, if a full screen image is loaded in the browsing area, it is still very slow. I mean the width and size of a single image are very large. Is there a good solution?

For example, loading a large image in the red area will be slow.

Share: More


------ Solution --------------------
Even if a full screen image is loaded, you still need to process the image, such as compressing and initializing the image. you can cache the image through js, and the next time you open the image, it will be faster.
------ Solution --------------------
It is best to optimize the image at the front end/in the early stage, for example, after processing the image in ps = Save the format used by the web, jpg, png, or gif, whether the image is "continuous" or "optimized" is selected or tested based on your own situation, or you can use php to generate a thumbnail for display at the front end, so that the image can be loaded quickly, then, if you want to view the image, click the thumbnail to view the source image ,,,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.