I am attaching a patch that will allow image_resize_filter to work with version 1.x of the imagebrowser module. Version 1 uses custom paths to alias the actual image node paths. This patch will work back through the alias and rewrite the local path being considered.

The version 2 branch of the imagebrowser module retains this older path styles for backwards compatibility, so this support will still be good going forward.

Comments

bibo’s picture

Status: Needs review » Needs work

Hi @rwohleb.

Funny that you happened to post this patch just recently. I just installed imagebrowser a few days ago, and was trying to find out how to get it to work with imagefield and image_resize_filter. Imagefield seems to be supported nicely in the 6.2.x-dev-version, but image_resize_filter wasnt (according to some outdated, 12 month old post). The latest version has come a long way, and doesn't depend on image-module anymore (still supporting it though). But I couldn't find updated info about the compatibility with this fantastic module.

First I thought changing the input filter order of image_resize_filter to after that of imagebrowser, but it didn't suffice. I believe that's because the temporary imagebrowser tag just forgets the width/height set via the wysiwyg editor. The width/height attributes after saving are then based just on the imagecache preset) => image_resize_filter reads the preset width => since they haven't changed, it does nothing.

So I thought the simplest solution would be saving the width/height with some temporary solution and then adding them back to the < img >-attributes (after imagebrowser but before image_resize_filter). I was thinking about testing that theory and then coding a module or patch for that. I googled for a solution, but didn't find any (since this issue wasn't indexed yet by google I think). Luckily I found this. Judging from the attached patch you took a different path (hehe) than I thought was necessary.

Maybe it's better this way. However, the patch didn't seem to work for me. I believe that is because I'm using imagefield, and your path is made specifically for the image-module, right? (since imagebrowser 1.x is only compatible with image). I need to test this more (when I have time this week), and I probably need to change the patch a bit for it to work with imagefield.

I really want this working, image_resize_filter-compatibility would be the last piece to a complete set of userfriendly image handling tools.

If someone is interested in my current wysiwyg imagehandling setup, it looks like this:
* imagefield
* imagecache
* filefield_source (for image reuse)
* imagecrop (using a "freecrop" imagecache preset. It first scales the image to 950px width and then allows for free cropping)
* insert (for really easy inserting of imagefield images to the wysiwyg)
* wysiwyg (using TinyMCE, activated it's own image-plugin and the imagebrowser-plugin)
* imagebrowser (for alternative image reuse. Advantages over insert: really neat image browser based on Views, very flexible and neat. Also, it saves the insert primarily via fid, instead of hardcoded url. This is very usefull when moving from local/dev-sites to a production site or vica versa)
* image_resize_filter (for awesome automatic resizing set by wysiwyg)
* views (for setting up the imagebrowser filters, output etc)
* imagefield_extended (adding more textfields to the image, such as copyright info etc)
* lightbox2 (themed to output the imagefield_extended info)

Everything works perfectly together, except image_resize_filter and imagebrowser. I've been looking for years for a complete drupal solution for imagehandling. So far insert, image_resize_filter and wysiwyg have proven their worth. But I still want more, which is what this issue is about :)

rwohleb’s picture

My patch specifically tries to address the fact that Image Browser 1.x used its own paths for images, presumably to abstract the actual image path from the image node. I'm not exactly clear on the issue that you are running into.

For some background, I am running the ckeditor moule instead of using ckeditor through the wysiwyg module. I wasn't happy with the ckeditor integration in wysiwyg module yet. I modified a copy of Image Browser 1.x to use ckeditor insteadk of fckeditor.

quicksketch’s picture

Status: Needs work » Postponed

I don't particularly have an interest in adding this support to Image Resize Filter.

quicksketch’s picture

Status: Postponed » Closed (won't fix)

I'm moving this to won't fix. I'd generally discourage using Drupal as an image router in any case. Using an input filter to replace with real image paths (with which Image Resize Filter could then work) would be the approach I'd recommend over pass-through scripts like this in any case.