Q:

How to handle large image in HTML page

I have a large JPEG image about 3500 x 2500 pixels and 4 MB size.
I want to display this image in a HTML page so that it takes about 3/4 of the screen, 
and also compress it, so that it loads quickly, but without compromising the quality too much.
Is this feasible ?

A:

Yes, but not in HTML. You will need to run some sort of server-side script that will reduce the size of the image before it is transmitted across the wire to the browser. Languages that can do something like this include (in alphabetical order so I won’t be accused of favouritism) Perl, PHP, Python, Ruby and many others. However, it requires some experience in programming or the willingness to learn (by reading websites and/or books). I would recommend against asking a question here on StackOverflow that basically asks how to do it.

