Skip to main content
Happy Pixels
Florian Loretan's blog on Drupal, creativity and more
Triggering the creation of imagecache derivatives programmatically
Sunday, February 22, 2009 - 21:14
drupal
imagecache
images
code snippet
drupal planet
Comments
hello! i'm interested in this
hello!
i'm interested in this manipulation.
Could you give more info on where you put this script and how to trigger it?
thanks!
Custom module
You need to put this function in a custom module, and call it from your own code before doing any actions that depend on the resized image being present. Of course, imagecache needs to be enabled, so you probably want to add it as a dependency to your custom module.
thanks
thanks for your help.
What i'm trying to do is to create a rule (rules module) to auto generate imagecache derivatives upon content update.
My rule is called, the "imagecache_build_derivative" func is called too, but for some reason i don't see the image being created on my server.
Guess it still needs some debugging...
Thanks a lot for sharing this
Thanks a lot for sharing this very useful tips :-)
Thanks
I was stacked with this, calling "imagecache_create_path" and getting erratic results (depending on preset's flush status).
This simple piece of code saved my tones of hours.
Thanks fellows!!
Thanks!
Thank you very much!
Thanks a bunch for that piece
Thanks a bunch for that piece of code. Exactly what i was looking for.
Module
There is a module that will generate start to generate the presets the second after the image has been uploaded
http://drupal.org/project/imageinfo_cache
Re: Module
Great! Thanks for the reference.