image not showing on page load in Chrome after browser update

154 views
Skip to first unread message

Atomiko Lex

unread,
Nov 26, 2014, 7:40:56 AM11/26/14
to polym...@googlegroups.com
I am having issues with an image not showing on page load anymore, after a recent Chrome update. The img has srcset and sizes attributes, and will only show up after inspecting. 

Is anybody else having this issue? Is it a Chrome bug? Couldn't find anything for that in the Chrome logs. If anybody wants to check it on my page, it's here.

I am on 39.0.2171.71 in Chrome, no issues with that in FF 33.1.1 or IE 11.  

Lex
screenshot_no-image.jpg
Message has been deleted
Message has been deleted

Atomiko Lex

unread,
Nov 26, 2014, 2:08:43 PM11/26/14
to polym...@googlegroups.com
I noticed this a while ago already, but until now nobody is posting similar issues on Stackoverflow. 

Caniuse.com also says there are no known issues with the srcset attribute in Chrome, so is this in fact a Polymer issue? I can't understand why an image gets rendered only after opening the dev tools??

Anyway, my img is just in some divs inside a core-scroll-header-panel. 

Do you have any ideas on this, or should I rather post this somewhere else?

Thanks for any hints,
Lex

Atomiko Lex

unread,
Nov 27, 2014, 11:52:55 AM11/27/14
to polym...@googlegroups.com
Ok, so now I just put my img tag into an empty page without polymer and there were no issues in Chrome with srcset, so this is seemingly a Polymer issue. 

I am using version 0.5.0, would updating help, or is this unpatched yet? I would rather update later because of the breaking changes in 0.5.1. 

Thanks for any hints,
Lex

Am Mittwoch, 26. November 2014 13:40:56 UTC+1 schrieb Atomiko Lex:

Rob Dodson

unread,
Dec 4, 2014, 8:50:57 PM12/4/14
to Atomiko Lex, polymer-dev
Can you post a reduced test case like a jsbin somewhere? It's hard to debug without seeing the code

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/0930d785-2e47-425a-a675-aec89cfab9c4%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Rob Dodson

unread,
Dec 4, 2014, 8:51:51 PM12/4/14
to Atomiko Lex, polymer-dev
ah nvm I see the link in the first email now. Your photo is showing up fine for me

Atomiko Lex

unread,
Dec 5, 2014, 6:21:29 AM12/5/14
to polym...@googlegroups.com, lex.a...@gmail.com
Hi Rob, I had given up on the responsive image and changed it for a fixed image, so that's why the picture is there now. I promise I will put it on again on the weekend!
Thank you for listening, Lex
Message has been deleted

Atomiko Lex

unread,
Dec 8, 2014, 4:04:41 AM12/8/14
to polym...@googlegroups.com, lex.a...@gmail.com
I have a jsbin here now (w/o polymer).
Lex

Am Freitag, 5. Dezember 2014 02:51:51 UTC+1 schrieb Rob Dodson:

Rob Dodson

unread,
Dec 12, 2014, 4:00:44 PM12/12/14
to Atomiko Lex, polymer-dev
ok that's helpful.

The example is broken in current stable Chrome but works in Chrome Beta, so I think you stumbled upon a bug that's been fixed and will be updated when beta moves to stable. Generally we release a new version of Chrome every 6 weeks, so shouldn't be too long.

Atomiko Lex

unread,
Dec 14, 2014, 4:55:53 AM12/14/14
to polym...@googlegroups.com, lex.a...@gmail.com
Thanks Rob, that's good to know!
Lex

Atomiko Lex

unread,
Dec 14, 2014, 11:10:12 AM12/14/14
to polym...@googlegroups.com, lex.a...@gmail.com
Hi Rob,
I tested the example in beta and the image shows up now, but it isn't responsive. Should I file a bug for Chromium?
Lex

Am Freitag, 12. Dezember 2014 22:00:44 UTC+1 schrieb Rob Dodson:

Rob Dodson

unread,
Jan 6, 2015, 12:06:45 PM1/6/15
to Atomiko Lex, polymer-dev
I'm looking into this. Seems like their may be a bug. I'm trying to reduce it to an easy test case then I can file a ticket.

Rob Dodson

unread,
Jan 6, 2015, 4:18:16 PM1/6/15
to Atomiko Lex, polymer-dev
So this seems to be a problem with `document.cloneNode` which Polymer uses when it stamps out its templates.

You can reproduce it here: http://jsbin.com/tuwuco/1/edit?html,output
Set your devtools to a device pixel density of 3, refresh the page, and hit the 'run with js' button.


In the short term you can work around this by using vanilla custom elements/shadow dom and using importNode instead of cloneNode. But I think this should hopefully be fixed quickly.

Daniel Freedman

unread,
Jan 6, 2015, 4:59:21 PM1/6/15
to Rob Dodson, Atomiko Lex, polymer-dev
You can also use img.srcset = img.srcset after it exists in the page. This will make it re-evaluate the srcset correctly.

Reply all
Reply to author
Forward
0 new messages