/**
 * 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

drewish’s picture

Status: Needs review » Closed (won't fix)

That 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.

mikeytown2’s picture

I've already made the code for this. I'll check with the imagecache actions maintainer before creating another module.

cweagans’s picture

Issue summary: View changes

For anyone seeing this issue from a Google search or something, the module you're looking for is https://www.drupal.org/project/imageinfo_cache