Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does CSS resize images?

Let's say I have a image that's 1240x720 and I resize it to 1240x250 with CSS using height and width. I access my site and have to download it but, do I download the original one (1240x720) that then is resized on my browser or the already resized version (1240x250)?

From googling I can only find posts where people explain how to use it so this might be a really dumb question as it's not even mentioned anywhere..

like image 379
sysfiend Avatar asked Mar 10 '23 09:03

sysfiend


1 Answers

The browser will download whatever the URL points to.

If the height and width of the <img> don't match the dimensions of the image, it will be scaled to fit.

like image 137
Quentin Avatar answered Mar 19 '23 02:03

Quentin