Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In gererated HTML tags, height & width attributes are missing.
Comment | File | Size | Author |
---|---|---|---|
#6 | 707850-6.patch | 1.55 KB | srobert72 |
#4 | 707850.patch | 2 KB | srobert72 |
Comments
Comment #1
srobert72 CreditAttribution: srobert72 commentedMaybe this function could make it easy to resolve :
http://drupalcontrib.org/api/function/theme_image/6
Comment #2
srobert72 CreditAttribution: srobert72 commentedOr maybe error is here:
file : taxonomy_image.module
line : 286
Code:
It just doesn't use Height & Width defined above in line 277
Comment #3
srobert72 CreditAttribution: srobert72 commentedAny latest news ?
Missing width & height attributes is bad for site performance :-(
Comment #4
srobert72 CreditAttribution: srobert72 commentedAfter many tries, it seems that theme_image function doesn't display $attributes when image URL starts with "http://" and isn't a local image path.
Here is patch, maybe not best one, but it works.
Just for information, I use PageSpeed on my site:
http://code.google.com/speed/page-speed/index.html
After update with this patch I won 5 points in PageSpeed report.
Comment #5
xurizaemonAbove patch introduces a new file, '.project'.
Yes, we should use theme('image') IMO. If the image is remote, we don't set the width / height attribs - that's correct behaviour.
Comment #6
srobert72 CreditAttribution: srobert72 commentedSame patch without ".project" file.
Sorry I didn't seen it, it was generated by Eclipse IDE.