because $image_size is not reset on each iteration, image size info from already processed images will incorrectly be assigned to images that do not exist or do not have image info.
To reproduce, create a node with image resize filter applied to it with the following code:
<img src="path/to/working_file.gif" width="1" height="1" />
<img src="path/to/404_file.gif" width="1" height="1" />
the second image (and all other 404 images that come after a resizable image) will have the $image_size info of the last successfully processed image, resulting in a 404 at files/resize/path/to/404_file.gif and for me also another error: thrown by imageapi: "The selected image handling toolkit can not correctly process _image_close."
solution is to reset $image_size at beginning of each iteration.
Patch attached.
EDIT: Wrapped code in <code> tags.
| Comment | File | Size | Author |
|---|---|---|---|
| image_resize_filter-resizes-images-needlessly.patch | 485 bytes | nibblebot |
Comments
Comment #1
quicksketchThanks, an obvious improvement. I'll include this next time I'm working on Image Resize Filter.
Comment #2
quicksketchCommitted to D6 and D7 branches.