Effect of large amount of images on webpage

60 views Asked by At

On a webpage I have a upwards of 2000 images, the majority of the images through javascript are not all displayed at once and are separated into a new page that is hidden every twenty images. However these images are all loaded (Served by PHP) on each request. These images are stored externally on a clients host.

What I would like to know is what effect loading a large amount of images like this would be on the clients server if the site were to experience a boom in traffic? Would there be a high risk of taking their servers down or is something baked in on the webserver to prevent such a thing occurring. Caching etc.

2

There are 2 answers

0
Farid Blaster On

you should have this

  1. Resize image before upload
  2. Put loading every page for load, so it will be user friendly.
  3. Performance of server : i suggest u should try framework nodeJS + MeteorJs
0
Kunal Pradhan On

I work with top website (World alexa <200). You should consider trying following options.

  1. Use CDN for images. Cloudflare like CDN are free to use.
  2. Serve images request with proper caching headers, turn off logs. In nginx like server do following config. Adjust expiry time as per your requirements.

    location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { expires 1y; log_not_found off; }

  3. Keep images compressed.
  4. Turn on gzip compression on your web server.