Hello,

I might be wrong, but I think that imagecache should implement file_download hook, so that modules relying on generated images can properly check access rights with private file systems.

For example, take image resize filter module, used to generate scaled down versions of images. Take too a local image image.png.

  • imagecache generated version : imagecache/my_preset/image.png
  • resize_filter generated version : resize/imagecache/my_preset/image-20x20.png

When checking for access rights to resize/imagecache/my_preset/image-20x20.png, resize_filter checks original image grants by calling module_invoke_all('file_download', 'imagecache/my_preset/image.png'). But as imagecache doesn't implement file_download hook, nobody answers and access is not granted.

Here is a simple patch to implement file_download hook. Might be wrong, feel free to flame !

Alex :)

CommentFileSizeAuthor
imagecache_file_download_hook.patch1.17 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sandrewj’s picture

Status: Needs review » Reviewed & tested by the community
fizk’s picture

Issue tags: +ImageCache 3

Marking as ImageCache 3.x Todo.

fizk’s picture

Category: bug » feature
Status: Reviewed & tested by the community » Needs review