I am creating a website where people can upload images which are then shown on the index page, however, I've been wondering whether displaying 2000x2000px image in tag whose width and height is set to 400x400px slows down the loading time of the page/images.
Yes, the image will still need to be transmitted over the network in it's entirety before the client (browser) can scale it down.
Unless there is some server-side scaling done, the webserver doesn't know (and has no way to know) what size the user is expecting so it will simply serve up the file as uploaded and the client (browser) will scale it to the desired size. You can check this, as @l3fty points out, by right-clicking the image and viewing it or by entering the images' url directly into the addressbar.
Some CMS'es or other applications might scale your image server-side when uploaded or on demand but this depends on the application, it's configuration etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With