=== cSprites - Speed Up Page Load Time with Dynamic Image Sprites === Contributors: amummey Tags: css, sprites, cSprites, images, content Stable tag: 0.49 Requires at least: 2.7 Tested up to: 2.7.1 Donate link: http://mummey.org/csprites/ Automatically compress you content images into a big sprite, decreasing web page load time. == Description == The idea of combining images into a larger one and displaying this using CSS tricks has been around for awhile. There are a couple big benefits to doing this: First it reduces the number of HTTP requests that the browser has to make, by combining say 5 images into 1 big image, the number of image requests has been reduced by 4. This can increase the effeciency of page loading and you can see gains in the speed at which your page is loaded. cSprites will enable you to compress all of the images in your content into one big image, called a sprite and display this in parts. Thus the user will only have to make 1 request rather for all your images. **DEMO** on my home page: [View Demo](http://www.mummey.org/csprites/csprites-demo/ "cSprites for Wordpress demo") For more information on this cSprites plugin : [cSprites for Wordpress](http://www.mummey.org/csprites/ "cSprites for Wordpress") For more information on the cSprites core API please see my blog post: [cSprites info](http://www.mummey.org/2008/12/csprites-a-dynamic-css-sprite-generator-in-php5/ "cSprites - A Dynamic CSS Sprite Generator in PHP5") == Installation == This section describes how to install the plugin and get it working. 1. You MUST be running PHP >= 5.0 and have GD library 1. Make sure that you have this line in your `php.ini` file: `allow_url_fopen = ON` 1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress == Frequently Asked Questions == = I see some parts of other pictures in the image = You MAY NOT use padding on the image if you would like to use cSprites, this is because the images are tightly packed and when you use padding parts of other images may show through. Wrap the img tag in a div or other element and add some padding to that. = I am getting PHP errors = You MUST be running PHP >= 5.0 and have GD library = I am running PHP 5.0 and I still get PHP errors = Make sure that you have this line in your php.ini file: `allow_url_fopen = ON` = Still not working = Make sure that the *cache* directory in the wpcsprites plugin directory is writeable == Screenshots == 1. A sample dynamically generated sprite == Requirements == 1. Must be running PHP >= 5.0 1. GD Library for PHP installed 1. php.ini must have this line in it: `allow_url_fopen = ON` == Notes == cSprites is still quite experimental so please use at your own discretion. Please post any bugs found. == Release Notes == * **v0.482** * Added options to include/exclude certain image types from processing * Fixed the PNG compression (was not working before) * **v0.482** * fixed regex not matching single quoted html attributes * **v0.481** * fails much more gracefully, if cSprites requirements are not met * **v0.48** * fixed support for relative image urls * **v0.47** * added support for relative image urls * added new option in administrator to clear the cache manually * added a reset function to the cSprite core, might be applicable in the future * **v0.46** * Hook architecture was still broken. Now shouldn't mess up you post orders. * **v0.45** * Did a full rewrite of the hook architecture, I got it totally wrong on previous versions. Now scans the full WP Loop and processes it prior to displaying the content. In previous versions I was using *the_posts* hook and this was failing because many other plugins will also call this and we only want to scan the content. Now we use the *loop_start* hook. * **v0.43** * Fixed cache, wasn't working at all for images. Now is MUCH faster than before.