Empty height and width attributes in the generated image tags

BooDy - February 11, 2008 - 09:08
Project:Image
Version:6.x-1.x-dev
Component:image.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The function image_display() creates an tag and gives it the attributes retrieved from image_get_info(). If for some reason the height and width weren't retrieved, the attributes will be passed with no value which will cause IE to consider the empty values as 0s and won't display the image at all.

A simple check if the value of $image_info is not empty before assigning the height and width to the attributes array will solve this.

#1

sun - January 18, 2009 - 00:12
Version:5.x-2.x-dev» 6.x-1.0-alpha4
Status:active» needs review

Please test attached patch.

AttachmentSize
image-HEAD.image-empty-dimensions.patch 955 bytes

#2

justinrandell - January 19, 2009 - 04:50
Version:6.x-1.0-alpha4» 6.x-1.x-dev
Status:needs review» reviewed & tested by the community

worked for me.

rerolled to get rid of fuzz only.

AttachmentSize
image.empty_.dimensions.patch 955 bytes

#3

sun - January 19, 2009 - 10:45
Status:reviewed & tested by the community» fixed

Thanks, committed to 6.x-1.x and 5.x-2.x.

@justinrandell: No need to re-roll a patch if there is only fuzz.

#4

System Message - February 2, 2009 - 10:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.