Srcset not swapping out Images listed in srcset attribute
Reported by
dennisga...@gmail.com,
Jan 24 2018
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 Steps to reproduce the problem: 1. View test case in Chrome 2. Notice on resize or page load the images do not swap out correctly 3. View in Firefox quantum and notice the image swaps out correctly on page load and resize. What is the expected behavior? The images should honor the sizes attribute and srcset attribute by sizing and swapping out images used respectively. What went wrong? It did not do what is listed in the expected behavior. See previous answers. Did this work before? N/A Does this work in other browsers? No WebKit : Swaps out the images correctly, but only on page load. Quantum: Swaps out the images correctly on page load and page resize. Blink: Does not swap image on page load or resize. It only downsamples the size according to the sizes attribute Chrome version: 63.0.3239.132 Channel: stable OS Version: OS X 10.12.6 Flash Version: Test Demo: https://codepen.io/dennisgaebel/pen/jYoKmo
,
Jan 25 2018
Tested the issue on chrome reported version 63.0.3239.132 using Mac 10.12.6 with steps mentioned below: 1) Launched chrome reported version and navigated to URL: https://codepen.io/dennisgaebel/pen/jYoKmo 2) Reloded and resizes the page 3) Images get swaped out correctly @Reporter: Please find the attached screen cast for your reference and let us know if we missed anything in reproducing or verification of the issue, When the page is reloaded the images get swapped correctly, but when the page is resizes the images get swapped correctly but the size of the second image remains correctly. If possible can you please provide the screen cast of the excepted behaviour of the issue which helps us in further triaging it. Thanks!
,
Jan 25 2018
,
Jan 25 2018
You should be seeing images swap out on resize and page load just like Firefox does. Please make sure to check Firefox and compare with Chrome. I would also suggest to check DevTools to make sure the right src is in use and at the right context dictates by sizes attribute. Here are some screenshots showing the issues more clearly… BTW These were taken on page load as Chrome does not behave correctly on resize.
,
Jan 25 2018
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 5 2018
,
Feb 5 2018
Assigning to the srcset expert. Send it back if you don't think you'll be able to fix it or would like us to develop more expertise.
,
Feb 8 2018
When I look at this example, the problem that I see is that srcset *IS* sometimes swapping out resources, when it shouldn't be. Here's a reduced version of Dennis' example: https://codepen.io/eeeps/pen/rJWraN When widening the viewport on a 1x screen, the first image upgrades to a 400x400 image at the same time that the second image does, when the viewport is >= 400px wide, even though, per my understanding, it shouldn't. It also loads the 400x400 on first load when the viewport is wider than 400px. And in isolation, all by itself on a page, that same <img> is only ever 200x200. https://codepen.io/eeeps/pen/wyoXYy
,
Mar 15 2018
As far as I can tell this is WAI. If a higher resolution image is in the memory cache, there's no point in downloading a lower resolution one. See https://codereview.chromium.org/674923004 for the original code change that introduced this behavior. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by susanjun...@techmahindra.com
, Jan 25 2018