6

I've a site where users upload images and I'm displaying lots of images from users back to users. Most of the images are JPG but some are PNG.

I use manually created sprites for the images I have created myself but current user images are downloaded individually which adds time to page load.

I've done a bit of reading on PHP Dynamic Sprite Create like the on the links below:

http://www.mummey.org/2008/12/csprites-a-dynamic-css-sprite-generator-in-php5/ http://net.tutsplus.com/articles/news/dynamic-sprite-framework-with-php-new-plus-tutorial/

Does anyone have this functionality working and if so how/what did they use? recommendations?

cheers

1 Answer 1

3

I would combine PLupload (plupload.com) with the CSS Sprite Class from PHPClasses.org (http://www.phpclasses.org/package/6560-PHP-Generate-sprite-images-and-CSS-to-use-image-styles.html).

I recommend using PLupload because of the client-side image resizing feature, which can cut down on a lot of server processing.

Sign up to request clarification or add additional context in comments.

2 Comments

why would you want to increase client side processing... best to get as much work done on the server as possible... Also you ideas won't cut the mustard... that said no one else had any ideas so I guess this is an undeveloped area....
Actually, it's better to do an initial image resize client-side (which PLupload does automatically) so your upload file sizes are reduced. Everything else is done server side. Example: If someone uploads a 4492x3328 photo from their 15mp digital camera. You'd be a fool to try and resize an image that size via the server. Instead... do an initial resize to something more manageable like 1024x768. Then you can do post server resizing for things like thumbnails and secondary sizes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.