When inserting an image at the original size, it is not recognized as a standard size by the img_assist filter.
This patch checks the requested image size against the original size before trying to derive whether it should use the preview or thumbnail sizes or create a custom size.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | img_assist_original_as_standard_size0.patch | 1.58 KB | moonray |
| img_assist_original_as_standard_size.patch | 7.59 KB | moonray |
Comments
Comment #1
zoo33 commentedThis seems like a valid point although I haven't tested this myself.
I checked the patch and it's a little hard to read because of the whitespace changes. I suspect that the only real change is this part:
Am I right? I'm not sure how this is usually handled, but could you perhaps make a new patch without the whitespace changes (like I did with the Drupal 5 compatibility patch)?
One small issue is the comment immediately above this code snippet ("Get the width & height...") which appears twice after applying this patch. The first occurrence in said location should be removed.
Someone else willing to do some testing and reviewing?
Comment #2
moonray commentedAttached is the same patch without any whitespace changes, and the comment (see previous post) changed.
Comment #3
waltervn commentedAfter applying this patch inserting an image with original size works, but only if I choose the "HTML Code" mode. Choosing "Filter Tag" still results in a thumbnail.
Any help would be appreciated.
Comment #4
moonray commentedMake sure you're not seeing a cached version of the page (I had this at first as well). Best way to do that is to empty the cache table in the database. I think the devel module allows you to empty the cache as well.
Alternatively you can change some of the text in the node.
If that's not it, let me know, I'll try looking into it.
Comment #5
waltervn commentedAfter clearing the cache with the Devel module it's working now. :) Thanks a lot for the patch!
Comment #6
zoo33 commentedGreat! I'll commit this as soon as I can.
Comment #7
zoo33 commentedCommitted. Thanks moonray!
Comment #8
zoo33 commentedComment #9
(not verified) commented