My site has a php while-loop-generated table with about 2000 rows. Each rows renders from a variety of HTML elements including a user profile pic. The profile pic image size has smaller dimensions than the profile pic user uploads (on another page), so I was using css background-size
to reduce the image size.
However, I just learned IE8 does not support background-size, so on first thought I figured I would use an php-coded image resizing function I developed. Problem is that the function (per image) generates a base64-encoded data uri that on average adds 3850 characters per table row.
Doing the math, this would add 2000 rows x 3850 ~ 7.7 million characters to the table, which is about 6 times the character count of the current table. Since this content is non-cached (a php script loads this content on page load and every 2 minutes thereafter), I don't see this as a viable option.
One option I could try is found at here (Merging two images with PHP). In my case, I would merge 2000 images into a "sprite" which I then slice up using php, then take each slice and insert into the correct row using a while loop. This sounds like it could get messy (not sure yet though, haven't tried this).
Is there any way to resize an image without generating a ~4kB data URI? Any possibilities besides an image merge?