Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Dynamic Sprite Creation

Tags:

php

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

like image 958
Adam Avatar asked Aug 20 '11 04:08

Adam


1 Answers

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.

like image 68
Timothy Perez Avatar answered Oct 20 '22 00:10

Timothy Perez