-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple image sources problem #92
Comments
I'm also having issues using picture elements. Does it work if you only have jpegs? |
Hey @stalinkay, @tortilaman & @idoshamun You only have this issue in safari, right? It works fine in chrome, firefox etc? |
I've tested it in Chrome when I reported. On Sun, Oct 9, 2016, 17:36 dinbror [email protected] wrote: Hey @stalinkay https://github.com/stalinkay, @tortilaman You only have this issue in safari, right? It works fine in chrome, firefox — |
Did you also test with just jpegs? When I look at my examples page in chrome it shows a non fallback/default image: http://dinbror.dk/blazy/examples/ (example 1.5). I know it makes two image requests |
I haven't test with just jpegs but in my use case it shows the right image but my problem is the two requests as you said. |
Kind of same issue here. In my case, it always loads the default image. I'm using jpg. And i've tested the same html without blazy and data-attributes and it works correctly. I'm on latest firefox. Anyway, I report the code (really bare bones): var slides_blazy = new Blazy({
offset:1100
,container: '.home-slides-box'
,loadInvisible: true
}); <picture>
<source media="(max-width: 640px)" data-srcset="img1.jpg">
<source media="(max-width: 830px)" data-srcset="img2.jpg">
<img class="b-lazy" data-src="img2.jpg />
</picture>
|
@idoshamun @stratboy |
Great! Waiting for the fix, I use my fork meanwhile On Mon, Oct 10, 2016, 23:04 dinbror [email protected] wrote:
|
Fixed in v. 1.7.0. |
@dinbror |
Hmm ok that's odd. I only have the issue in safari. In latest chrome and firefox it is working fine. What image do you see on my examples page, example 1.5? |
@dinbror |
Really odd. Do you have a live example? |
@dinbror |
Hey @stratboy The first link gives me 404 on blazy:
But try changing this:
to
|
@stratboy
I have the same issue in safari and internet explorer. Any idea for a bug fix or workaround? |
christopherwiegel: ok, but is the alt attribute all about with a preload task? Also, if anyway the whole thing is not going to work with safari and explorer, probably on a production website the best thing is to still use the legacy old way right? |
I'll look into a fix |
@stratboy what do you mean with "still use the legacy old way right" |
Fixed in v. 1.7.1 |
Ok I confirm it's working properly even in firefox (at least latest). Thank you! |
No, it doesn't work at least in IE11. So using the picture element it's not a shim and not a viable alternative to the legacy blazy's 'breakpoints' option. You probably should not mark that option as obsolete until the other solutions are fully crossbrowser (in other words, until blazy will act a real shim/polyfill). |
Also, as per the the responsive images community group, you probably should enforce the use of srcset on the img tag instead of src > that's the main reason you had the double-loading probled I guess. Please see the gothas here: https://scottjehl.github.io/picturefill/ |
Hey @stratboy What version of blazy are you using when you test in IE 11? |
Hi, yes, I'm using v1.8 dinbror ha scritto:
|
Hey @stratboy Could you please try v. 1.8.1 |
Hello, Sorry to reopen this issue, but it seems that we have the bug again on IE11. If I visit this page: http://dinbror.dk/blazy/examples/ with IE11 on the example with multiple sources, it only displays the default image and don't consider the source tags. See attachment: Edit: I am using the Blazy version 1.8.2 |
Hi @yvmarques The picture element isn't supported in IE11 or in IE at all. You need to use a polyfill if you want support |
I forgot to mention that I am using the picturefill 3.0.2 as well. |
We currently have the same issue |
I also opened up a new issue for this: #140 |
I'm having trouble getting this to work correctly. I also want to use .webp but it's always loading the default image. If I remove the src attribute the class becomes b-error. How can I get it to work correctly?
The text was updated successfully, but these errors were encountered: