custom generated image storage location
guardian - April 26, 2008 - 18:25
| Project: | ImageCache |
| Version: | 5.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (code needs work) |
Description
hi, here is a first try as providing custom storage location for imagecache.
the patch attached enables you to get files/images/cache/[preset]/images/woot.jpg<code> urls instead of <code>files/imagecache/[preset]/images/woot.jpg
why ? because i like it like that baby
feel free to review, comment, whatever
cheers, g.
| Attachment | Size |
|---|---|
| imagecache_custom_directory.patch | 3.22 KB |

#1
#2
by the way, the patch has been generated from CVS, DRUPAL-5--2 branch
#3
fixing indentation
#4
the patch looks pretty good at a glance. It needs additions to the requirements to verify the path is writable. Also as validation for the imagecache path settings form input. I'd prefer to see an element validator.
#5
ok here is another try
i just discovered about
hook_requirements, this new patch does:imagecache.installimagecache_directory_pathvariable at uninstallimagecache.module'#after_build' => array('system_check_directory')by a validate function#6
new patch taking http://drupal.org/node/66763 into account
now, the custom directory for image derivatives has to lie in side drupal's
files/directory which has a proper.htaccessfile#7
sorry i uploaded the wrong patch
this one should be correct
#8
#9
I'll have to look, but I think that .htaccess file that prevents Apache multi type exploits doesn't apply to imagecache generated derivatives... since we know they're images... so we can technically move imagecache anywhere... including /imagecache or /images when I'm working on 2.1 we'll figure this one out.
#10
does it delay the patch until 2.1 or only allowing the derivatives to be outside the files directory ?
#11
yes. I'm not doing any more feature additions for 2.0.
#12
updated patch to current head, please consider it while it applies
cheers
#13
i tried the latest of your patches from that link and i can change the path of imagecache now. thats nice and it creates the imagecache folder outside the installationpath of drupal, but it does not create a preset-folder and no image file.
please help,
thnx!!!
#14
nothing?
#15
no longer applies to head.
#16
which doesn't surprise me since it was a 5.x patch and now HEAD is 6.x
when I synced the patch with HEAD it was still 5.x (http://drupal.org/node/251597#comment-866944) - I asked dopry if he could have a quick look but he answered he had no time to do so and that asking would not help
I'm sorry, I don't run D6 yet
I also switched the version to 5.x-2.x-dev since the patch originally came from CVS, DRUPAL-5--2 branch
#17
good patch, will it apply to 5.x?