Load 1000 images smartly

后端 未结 5 943
灰色年华
灰色年华 2020-12-10 03:55

I have like 1000 images on the same page. Unfortunately, I can\'t use sprites on them, as the number of images increases continuously. So you can imagine it sends 1000 HTTP

5条回答
  •  孤城傲影
    2020-12-10 04:33

    The best answer I can think of:

    Don't do this. Don't load 1000 images on one site, and do use some kind of lazy loading or pagination.

    Nevertheless, one idea, not sure if it fits, as you never gave the concrete use case: run a cron job to stitch the images together to a/some bigger image(s) every X minutes depending on your needs. Use the bigger image as you would use a sprite solution.

提交回复
热议问题