Download & Extend

Image height not set so image not shown in IE

Project:PEAR Wiki Filter
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

When specifying the image width, like this

[[image:my-image|left|90px|Some Description]]

then the html-tag looks like (only the relevant parts shown):
<img  ...  width="90" height=""  ...  />

This causes the image to not show in IE (at least in IE7), or, it shows only as a 90 px wide and 1 px thick horizontal line.

Comments

#1

Status:active» needs review

In sites\all\modules\pearwiki_filter\pear_override\render\Xhtml\Image.php I added a check to see whether only the width was set, and if so, calculate the height from the new width multiplied with the height / width ratio of the original file.

Now it works in IE7.

Patch applied. Please review. (Be sure to patch the right Image.php file, since I didn't apply the patch against the directory tree. The right file lies in something like /sites/all/modules/pearwiki_filter/pear_override/render/Xhtml )

AttachmentSize
Image.php_.patch 2.77 KB