Programmatically create presets
Jay Matwichuk - May 17, 2009 - 22:40
| Project: | ImageCache |
| Version: | 6.x-2.0-beta9 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Is it possible to programmatically create imagecache presets? I am creating a module that will grab images remotely, scale/crop them, and then display them to the user. I will be using imagecache to do the scaling/cropping, so the imagecache module will be a dependency for my module. I would like to set it up so that my module automatically creates the imagecache preset that it will use to scale/crop the images if possible, instead of having to go in and manually set the sizes in the imagecache admin interface. Is this possible?

#1
Check the imagecache.api.php file in the ImageCache package for more information about the hook_imagecache_default_presets(), which you will need to achieve this
#2
Thanks mate, I'll play with that.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
http://drupal.org/node/558664