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.
Originally raised in #1352378: IE 6,7,8 crashed? Possible problems and workarounds (discussion thread).
The images attached to articles do not show. A grey rectangle shows where the image should be, but has minimal width.
Comments
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedYou have to do better than that if you want some help - as in show me a live example.
Comment #2
magpie5212 CreditAttribution: magpie5212 commentedSorry, the a examples were in the previous problem.
See http://www.southamonline.org.uk/node?page=3
I have checked the source on IE8 and the image references are being included. However there just seems to be a grey frame where the image should be.
If IE is set to 'no style' then the picture shows, also if you set compatibility mode.
Comment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedCheers, intersting thing is If IE is set to 'no style' then the picture shows, I can't get to this for a couple of days I'm afraid, I need to get my virtual machines sorted out due a change of work station etc, this can't happen possibly until Monday.
Comment #4
Valeratal CreditAttribution: Valeratal commentedI have this problem. I tested IE8 in "IE Tester"
Code
<DIV><SPAN class=difield><A href="/article/korporativnaya-kultura-protiv-progulov"><IMG title="Корпоративная культура против «прогулов» на работе" alt="Корпоративная культура против «прогулов» на работе" src="http://auto.hr-portal.ru/files/styles/60x40/public/mini/96572552.jpg" width=60 height=40 typeof="foaf:Image"></A></SPAN> </DIV>
IE7 and IE9 - OK (in IE tester)
Comment #5
Jeff Burnz CreditAttribution: Jeff Burnz commentedValeratal - how are you adding those images?
Comment #6
Valeratal CreditAttribution: Valeratal commentedThis image upload by drupal. (in field)
Comment #7
Jeff Burnz CreditAttribution: Jeff Burnz commentedValeratal - something is modifying the output, the correct markup is as per #2, the markup in your example is not what this theme produces.
I have my virtual machine up and running again so can take a look at this as soon as I have some time. Should be shortly. I like to run IE8 etc native and not use IE tester (its ok, but not the same since IE8 on IE tester is a very early beta).
Comment #8
Valeratal CreditAttribution: Valeratal commentedanother example (its not my site)
_http://kazanbuilder.ru/
Comment #9
MStrzelecki_ CreditAttribution: MStrzelecki_ commentedmasybe it is something related to http://www.456bereastreet.com/archive/201202/using_max-width_on_images_c... ?
Comment #10
Jeff Burnz CreditAttribution: Jeff Burnz commentedYeah, that example shows it very well, I will read the article and see if I can find a better solution than the one proposed (its not exactly feasible for us to remove width attributes for only IE8 in Drupal).
Comment #11
Jeff Burnz CreditAttribution: Jeff Burnz commentedThis issue was not picked up earlier because it did not exist until Drupal 7.9 when "Restored height/width attributes on images run through the theme system." was added. Previous to this image height and width attributes did not exist in D7 for performance reasons.
As per the article on 456bearastreet the bug is triggered when combining the image width attribute with
max-width: 100%;
. This is exactly what Adaptivetheme does so we have the bug.There are two clear solutions:
1. Remove image width attributes for IE8, needs JS, not very attractive but would retain flexible images for IE8.
2. Use CSS, loose flexible images in IE8 but keep the browser performance benefit of printing the width attribute.
I have gone for the CSS solution. Its easy, lightweight and works. I do not think loosing flexible images in IE8 is really a big deal either.
You can hack this into any sub-theme or add directly Adaptivetheme core, at.base.css on line 71:
I will commit this shortly to dev.
Thank-you very much miszcz for the link to the article that helped solved this mysterious issue.
Comment #12
MStrzelecki_ CreditAttribution: MStrzelecki_ commentedI am proud I could be usefull :) You're welcome.
Comment #14
magpie5212 CreditAttribution: magpie5212 commentedThis is not fix, just awaiting action by owner.
Comment #15
magpie5212 CreditAttribution: magpie5212 commentedComment #16
Jeff Burnz CreditAttribution: Jeff Burnz commentedIts fixed, its been in DEV for weeks and is in the new release!
Comment #17
snoopy77 CreditAttribution: snoopy77 commentedMany thanks Jeff, I was reported the issue after the migration to 7.10.
The CSS solution works perfectly.
Cheers,
Fabrice