-
1. Re: Is it possible to downsize a large image on the server side (before serving it to the user)?
bregent Jun 19, 2014 6:16 PM (in response to jyeager11)Sure. Just search the web for "php dynamic image resize" or change to whatever server side scripting language you are using.
-
2. Re: Is it possible to downsize a large image on the server side (before serving it to the user)?
jyeager11 Jun 19, 2014 7:03 PM (in response to bregent)After a very quick preliminary search, I found a few tutorials on the subject, but they don't mention whether or not the number of bytes being transferred is affected by the dynamic resize.
You're saying it is, correct? *crossing fingers*
-
3. Re: Is it possible to downsize a large image on the server side (before serving it to the user)?
bregent Jun 19, 2014 8:20 PM (in response to jyeager11)The size of the image is actually reduced on the server, so the size in bytes sent to the client will be less.
-
4. Re: Is it possible to downsize a large image on the server side (before serving it to the user)?
jyeager11 Jun 20, 2014 2:13 PM (in response to bregent)That's amazing. I didn't think it was possible without saving files on the server first.
This will suit my needs just fine, but allow me to push my luck even further with the following "hail mary" question : would it be possible for the server to serve the PNG with a width of 100% of the container? In other words, the behavior would mimic width=100% but the server would still only serve as many bytes as are needed to fill that space.
Not only would I not have to create separate files for every resize (we fixed that problem with your suggestion) but I wouldn't even have to customize every link to a specific size.
I'm not expecting an affirmative on this one, but it was worth asking. =)


