Currently, inline thumbnails of images that don't have an aspect ratio of prvWxprvH (whose values are hard-coded in imce-content.tpl.php) are displayed distorted.
I've attached a very simple patch that makes inline thumbnails shown in the file list to be displayed according to the image's aspect ratio (only height is adjusted, width remains constant at prvW).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | IMCE inline thumbnail aspect ratio fix - works in IE | 624 bytes | paul2 |
| IMCE inline thumbnail aspect ratio fix | 541 bytes | paul2 |
Comments
Comment #1
paul2 commentedI tested my patch in IE and the thumbnails were oversized. Apparently IE decides to ignore both
widthandheightattributes of the<img>tag if even just one of the CSSwidth/heightis provided. So I just added another line to force the CSS width to beprvW.Comment #2
ufku commentedthanks for the patch, however it ignores prvH value which may result in thumbnail heights bigger than prvH. And also images smaller than (prvW x prvH) are forced to scale up.
Comment #3
ufku commentedFYI, I've just committed a fix to 6.x branch. Thank you for your effort.
Comment #4
ufku commentedComment #5
yelloroadie commentedIt seems this fix has solved the problem for "small" thumbnails, but medium, large etc still crop the original image and do not respect the aspect ratio.
What would be really nice, would be two options:
Comment #6
ufku commentedthis issue is about inline thumbnail preview, not thumbnail creation. You should open a separate feature requesting issue.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.