First one is not an option at all. There is still paid or limited traffic for many clients, and the former approach can cost them a lot. Besides, sending large chunks of data may slow down the overall performance of your app.
Ok to resize at server side an Image What Should I use
right now I am using this code
`$filelocation='old file location';
$newfilelocation='new file location';
$size = getimagesize($filelocation);
$width=$size;//might need to be ['1'] im tired .. :)
// Plz note im not sure of units pixles? & i could have the width and height confused
//just had some knee surgery so im kinda loopy :)
$newwidth = 760;
$newheight = $height*($newwidth/$width);
$pic = new Imagick( $filelocation);//specify name
//again might have width and heing confused
1.create the thumbnails before uploading the images in the first place so as to upload both versions together.
2. Create the thumbnails from the full sized images as soon as the full sized images are uploaded.
3. Create the thumbnalis from the full sized images just prior to sending them to the client for the first time.
In my case I was the first user and I didn’t mind the wait.
It’s been 17 years (I did say ancient) and I had a dial-up cnx at the time, but unless my newbie excitement affected my perception of time I don’t remember it taking all that long. (max ~10 thumbnails per page and they were 125x94 created from 400x300)