We recently had a problem where sometimes the image resize that had previously been applied was lost when Drupal caches were cleared. So the original image was being referenced with html resizing. This was instantly noticeable because the lightbox feature was gone, which we are applying via image resize filter REL attribute. I was unable not narrow down why the image resize was being "lost" on some content and not on others. Also, we could get the image resize applied to a node's content again where it was previously lost by editing the content, reinserting the image (using insert module) and saving the node again. But when we clear the Drupa cache, the resize would be gone, again.
After some input filter order testing I was able to have consistently resized images across my content by placing the Image resize filter as the last input filter. The other filters we are using in the order we are using them now:
* HTML corrector
* Node Picker Links (version 6.x-1.0-alpha3)
* Pathologic (version 6.x-3.x-dev from 2010-05-09 configured to NOT have "Output full absolute URLs" checked)
If all my testing and research is correct, I recommend updating the install instructions to state if you are using pathologic (maybe only 3.x series, can someone else check?), the image resize filter should be run AFTER pathologic.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | image_resize_filter_pathologic.patch | 1002 bytes | quicksketch |
Comments
Comment #1
quicksketchI can't think of how Pathologic would have an effect one way or the other. The only thing that could be causing it would be if your files directory is being corrected by Pathologic and without it the images in the HTML do not point to the actual files.
Comment #2
timwoodIt's my understanding that all Pathologic does, when configured how I have it, is remove the http(s)://hostname from the URL's in content (href, src, etc.) based on my list of hostnames that it should consider "local". I believe it's not correcting any files directory path. We aren't using multisite right now, just sites/default.
Comment #3
quicksketchI'm going ahead and closing this issue after a lack of activity. Please reopen if you have further questions.
Comment #4
timwoodWas my recommendation added to the README.txt or project home page? I'm happy to submit a patch to the README.txt if that's what's needed. We still have the input filter configured in the following order to prevent the original problem from happening:
HTML corrector
Node Picker Links
Pathologic
Image resize filter
Email link obfuscator
Maybe it's something to add to the Pathologic documentation rather then Image Resize Filter as Pathologic recommends it be the last filter applied...
Comment #5
quicksketchI've updated the Image Resize Filter documentation to include that Pathologic needs to be run before Image Resize Filter (on both the project page and README.txt).
Let's move this to Pathologic, since the documentation would make it quite hard to get it working with Image Resize Filter. Generally I follow the pattern that modules try to address the needs of modules that have more usage then them (like how Image Resize Filter supports ImageCache, since ImageCache is more popular than it). Pathologic's documentation could use the following:
- Pathologic should be run BEFORE Image Resize Filter
- Pathologic should be run BEFORE the HTML Filter
If you're being told that Pathologic runs last, but Image Resize Filter needs correct paths in order read the images from disk, you've got yourself a very confusing situation. Image Resize Filter also requires that it is run before the HTML Filter (so that it can read height and width from "style" attributes before they are stripped out).
Comment #6
Garrett Albright commentedAdded a note to Pathologic's documentation about Image Resize Filter. Thanks for the heads-up.
Comment #7
Garrett Albright commentedComment #8
quicksketchThanks Garrett, hopefully that will help prevent some confusion when using these modules together.
Comment #9
timwoodThanks to you both!