Admin Screen


Features (7.x)

Imageinfo Cache will generate image styles right after an image is uploaded and also on entity save. This will help with front end performance as the needed image style will already have been generated; thus the end user doesn't have to wait for the image to be generated. This can also mitigate some issues with image style generation if your CDN is configured incorrectly as the images will be generated without the request going through the CDN.

It can also put a cache inside of image_get_info() so that requests for image width, height, etc will come from the cache backend instead hitting the disk.

If you have $conf['image_allow_insecure_derivatives'] = TRUE; in your settings.php file you can remove ?itok= from image urls.

You can also disable on-demand generation; so that on demand image generation is not possible unless you have the "administer image styles" permission. Image styles will still be generated on file upload and entity save.

Drush (7.x)

Comes with a drush command called image-generate. It will generate images for a given field and style.

Installation Notes: (7.x)

The HTTP Parallel Request Library module is recommended but not required.
If caching calls to getimagesize, then you might want to apply this core patch as well to avoid disk access to the image #2289493: image_get_info always populates file_size, even if already set.

Other Code Using It


Problem A: Your setup went from 1 server to multiple servers. theme_imagecache()/theme_imagefield_image() is taking a lot longer due to the files directory being a NFS mount (etc...).
Solution: Caching so PHP doesn't hit the disk to get the image info.

Problem B: Waiting for imagecache to generate all the images after you press node save.
Solution: Generate imagecache images right after the image is uploaded.

Explanation: (6.x)

  1. Imageinfo Cache adds a caching layer right before theme_imagecache()/theme_imagefield_image() is called; thus future requests do not access the disk when requesting image_get_info() which calls getimagesize() and filesize(). This saves disk hits, and if your files directory is shared, you might see some big improvements in performance as a result.
  2. Imageinfo Cache will grab the image right after it's been uploaded from the CCK widget and will generate all imagecache presets. It will also run the file through the 2 theme functions mentioned above so the cache is primed. This happens in the background, not taking any resources from the

This module was created to solve a unique issue with a multi webhead system. Works best when not using the database for caching; recommend using something like memcache.

Installation Notes: (6.x)

2.x Requires the HTTP Parallel Request Library module.
1.x & 2.x Require the 6.x-2.0-beta12 (2011-May-16) or greater version of ImageCache.

Related Modules

Supporting organizations: 
Paid for mikeytown2 to develop & maintain this module

Project Information