Brian Leishman
Brian Leishman

Reputation: 8575

When To Use Different Image Files On The Same Page

Say I have two of the same image being displayed on a page, but at different sizes. I know that having an image already the correct size that it is to be displayed increases performance (especially on mobile devices), but I also know that using the same src creates only one trip to download the image.

So my question is, which of these two options would generally provide the best performance considering all the possible variables (browser, device, computing power, internet speed, etc.)?

Upvotes: 0

Views: 35

Answers (1)

Tony Hinkle
Tony Hinkle

Reputation: 4742

There are too many variables for someone to answer the question definitively. For example, for a newer device, which will have a faster graphics processor, on a slow network, one file might be best because it can resize it quickly. So you have connection speed, graphics processing speed, number of images, composition of images, and size of images as factors that will impact what is best.

Upvotes: 1

Related Questions