PHP Image Cache – Compression & Caching For Images

Caching and compression of every kb served has a huge effect on site performance.

Image Cache is a lightweight PHP class that compresses, moves, and caches the image in the user’s browser.

PHP Image Cache

After that, it returns the new source of the image to be printed in an image tag which results in a serious gain on load time.

The class works by simply setting options like the directory, the base URL, etc. and calling a compress function for each image.