/**
* Request URI, thus generating pic
* @param $path
* The path to the orginal file
*
* Notes
* This is a slow function, since it waits for each derivative to be generated
*/
function generate_images_for_all_presets($path) {
foreach (imagecache_presets() as $preset) {
file_get_contents($base_url.$base_path.imagecache_create_path($preset['presetname'], $path));
}
}
Implementing this as an action would be a nice addition.
Comments
Comment #1
drewish commentedThat seems very site specific. Many sites have lots of different presets that only apply to specific content. Seems like it'd eat up a lot of diskspace there.
If it was an action how would it know which file to use?
I'm going to mark this a won't fix since I don't see it being able to be flexible enough for a non-programmer to use it.
Comment #2
mikeytown2 commentedI've already made the code for this. I'll check with the imagecache actions maintainer before creating another module.
Comment #3
cweagansFor anyone seeing this issue from a Google search or something, the module you're looking for is https://www.drupal.org/project/imageinfo_cache