I'm using the Zen 5 theme including respond.js in Drupal 7. I'm also using Picture in conjunction with the Breakpoints module to render images for Flexslider, so this issue might be related to Breakpoints or Flexslider, but I don't know. I'm sorry if this is not a Picture issue.
When the site is viewed on IE8, the "delivering" of the images in Flexslider slideshows does not respect the sizes (image styles) I defined. No matter what the breakpoint is, the images are always delivered at just one size, which is the fallback size I set in Flexslider. (This is confirmed in the HTML ouput.)
Because IE8 is not used on small devices, the actual size of the images does not concern me. However, the various image styles I defined also vary in shape, which is what matters most to the design of my pages.
(This works perfectly in latest Firefox, Chrome, Opera, IE9.)
Comments
Comment #1
attiks commentedYou can try the weblinc polyfill it supports older IE
Comment #2
sackwort commentedOK, thank you. I'll give that a go.
Comment #3
sackwort commentedSorry to be a pain, I've downloaded "picture-master" but I don't know what to do with it!
Comment #4
attiks commentedFirst try with the latest dev version, download from the project page, go to picture, settings a select weblinc instead of picture fill
Comment #5
sackwort commentedOK. Thank you very much, attiks.
Comment #6
edwinljacobs commentedI'm having exactly the same issue, I'm using a flexslider with breakpoints mapped to various image styles. As described above Everything works just fine except for IE8. Breakpoints work fine The flexslider also works fine however in IE 8 the images displayed by the flexslider are always displayed in the fallback style. I have tried to use the latest version of the picture module and use "weblinc" instead of "picturefill" however this caused the issue to spread to all browsers.
So what exactly is going on, In IE8 the images in the flexslider are displayed with the fallback image style and are pushed in the top left corner of the flexslider container. In Chrome or firefox everything works as it should be.
Perhaps this is a config issue however after spending a few days on it, i don't see it. Any tips or suggestions??
Also this is on D7 (7.22) with respond.js, perhaps its usefull to note the i'm including html5shiv.js in IE8.
Any help is greatly appreciated, Kind regards
Comment #7
attiks commentedCan you try it in another theme?
Can you check for any javascript errors?
Comment #8
edwinljacobs commentedThanks for the quick reply,
I sort of got it fixed: One of the problems was that you can apply settings to the flexslider under
admin/config/flexslider and there pick your flexslider. Or you can apply the same kind of settings to the flexslider under admin/structure/views, pick your flexslider view. Apparently something went wrong there.
We noticed that breakpoints and pictures work correctly for any picture not in a flexslider also in IE8 so thats a relieve. Ill post again when i know more.
Comment #9
attiks commentedIs this still a problem?
Comment #10
Jim Bacon commentedWhile not using flexslider (at the moment), I am having a similar issue with IE8 only showing the default image when using PictureFill.
I see the matchMedia polyfill is included with the Picture module and loaded if the Picturefill is used.
The notes about matchMedia (https://github.com/paulirish/matchMedia.js/) say it is also used in Respond.js. I am employing the Zen theme which includes that and I wondered if there is some conflict between the two versions. However, turning off Respond.js does not fix the pictures so that seems to eliminate that.
I see your demo (http://picture7w.h011.attiks.com/node/1) is using the Responsive Bartik theme which also employs Respond.js.but with the WebLinc polyfill. Switching to WebLinc myself, the problem is initially worse as there are now problems with other browsers. It seems likely I have some error in my html which I am hand coding so that I can switch between completely different images as screen size changes. A test demonstrates that, if you only use min-width in the data-media field, the ordering of images matters and differs between Picturefill and WebLinc. Specifying a min-width and a max-width for every intermediate media query solves that problem.
So the following html with WebLinc is what works best for me (width and height attributes removed for clarity).
For some reason, IE8 doesn't respond immediately to resizing, taking two resizes to make a change. I see that there is a similar problem with the demo although it is less easy to detect than in my case as all the images are similar.
In summary, I found
Comment #11
Mayank-Kanungo commentedI face issue with IE8.
i.e for google chrome and Mozila firefox picture module work perfect but for IE8 responsive images are null while I use picturefill library and WebLinc library is work for me for all browser.
change need to done at http://hostname.com/admin/config/media/picture/settings
Thanks Attiks
Comment #12
attiks commentedVersion 2.0 should be able to hanlde IE8
Comment #13
carlos.macao commentedI've been trying to use version 2.0 but with no success on IE8. This is the code generated for IE8, with sizes attribute (no image):
I've also tried breakpoints without success.
After using srcset-polyfill the images shows on IE8 but using the fallback image.
Is this too soon to use version 2 on IE8?
Comment #14
attiks commented#13 IE8 should just work if the polyfill is loaded in the head of the document (is so by default)
You can check your picture mapping, since you're using a combination of both media queries and sizes, you should be able to reduce it to only use one, so either remove all sizes and just select an image style, or add an empty breakpoint and use sizes on that one.
To be sure IE8 behaces like it should, check the demo page of the polyfill at http://scottjehl.github.io/picturefill/examples/demo-01.html
Comment #15
attiks commentedI just committed a potential fix to the dev version, if you want to test wait 12 hours or use the git version.
Comment #17
attiks commentedFix only committed to 2.x version
Comment #18
carlos.macao commentedHi attiks,
Ok, I narrowed picture to one method, now I am using breakpoints and styles. I've installed your patch #16 and now I don't need srcset-polyfill, the images shows on IE8, but stills uses the fallback image. I've explicitly declared
<script src="/sites/all/modules/picture/picturefill2/picturefill.js" type="text/javascript"></script>before $styles and $scripts. No success.I am using, last modules of Picture, Views, CTools and Breakpoints. And yes, demo page of the polyfill works well on IE8.
The problem only appears on IE<10, for IE10 Picture works well.
Code for IE8:
Code for IE10:
Comment #19
attiks commentedIf you check the source, is there a document.createElement at the top?
You should not add script tags manually.
Looking at the img tag in IE8 it looks like the polyfill did at least do something
Comment #20
carlos.macao commentedYes, on header zone:
<script type="text/javascript"><!--//--><![CDATA[//><!--document.createElement( "picture" );//--><!]]></script>I've sent you privately a link to a test zone, if it helps.
Comment #21
attiks commentedI tested this with omega 4 theme, with all additional libraries (part of omega sub theme) enabled:
Comment #22
carlos.macao commentedI also tested the demo (on the original link and hosted on my server) and it does not work.
And I am not the only one, look at: https://github.com/scottjehl/picturefill/issues/262
I also tried the demo, with the libraries listed by you (except for the omega theme), no success. Does your successful test has public access? I could try to find the reason why your example works and the others doesn't.
PS: Correction, IE9 works well, the problem shows only on IE<9
Comment #23
attiks commented#22 Test site is not public yet, I'll try to set up a minimal test site next week
Comment #24
attiks commentedWaiting for upstream fix
Comment #25
attiks commentedAssuming this is fixed, if not feel free to re-open or create a new issue.