Closed (fixed)
Project:
Image Resize Filter
Version:
6.x-1.6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2009 at 18:01 UTC
Updated:
19 Dec 2010 at 21:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchThe Resize Image Filter does not currently run through theme_image() or any theme functions at all, though that's an interesting possibility. All that Image Resize Filter does is read the height/width attributes, create an image to match it, then update the SRC attribute. Though now it's doing things like adding links and such, it might make sense to pass it through the theme layer also. Right now it's not though, so there's no way you can affect its output.
Comment #2
quicksketchI've been thinking about this issue for a while now and decided to take a look at the possibility. It does open up some very interesting uses if you're able to run
<img>tags through the theme layer. You can do things like read out the "title" attribute and display it as a caption, or wrap your tags in divs or add your own classes. Generally a lot of useful possibilities here. Here are patches for D6 and D7.Comment #3
quicksketchAlright, a few further tweaks and I've committed this version of the patch. This patch makes the change that all images are run through theme_image_resize_filter_image(), even if they don't have their original size changed (however the output should be identical before and after with the default theming). This allows for special theming of all inline images, such as taking the "title" attribute and printing it as a caption.
I expect this may need a little further tweaking before a new release of the module, but this is a good start on potentially very useful change.