Throughout various projects I've had to add specific validation before actually building the image cache itself. I'd like to suggest the inclusion of a hook (imagecache_preprocess_cache) just before building the cache inside _imagecache_cache (imagecache.module):
// Preprocess image before cache is generated.
module_invoke_all('imagecache_preprocess_cache', $preset, $src, $dst);
// check if deriv exists... (file was created between apaches request handler and reaching this code)
// otherwise try to create the derivative.
if (file_exists($dst) || imagecache_build_derivative($preset['actions']....This will allow other modules to intercept the imagecache processing before the image starts being processed.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | imagecache-hook_imagecache_preprocess_imagecache-2114181-2.patch | 2.61 KB | vgardner |
| #1 | imagecache-hook_imagecache_preprocess_imagecache-2114181-1.patch | 791 bytes | vgardner |
Comments
Comment #1
vgardnerComment #2
vgardnerThis path includes the hook to the api documentation file.
Comment #3
vgardner