New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 805549 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Srcset not swapping out Images listed in srcset attribute

Reported by dennisga...@gmail.com, Jan 24 2018

Issue description

UserAgent: 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
 
Labels: Needs-Triage-M63
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!

805549.mp4
5.0 MB View Download
Cc: viswatej...@techmahindra.com
Labels: Triaged-ET Needs-Feedback
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.
Screenshot 2018-01-25 09.27.36.png
434 KB View Download
Screenshot 2018-01-25 09.26.31.png
422 KB View Download
Screenshot 2018-01-25 09.26.37.png
432 KB View Download
Screenshot 2018-01-25 09.26.51.png
407 KB View Download
Screenshot 2018-01-25 09.26.56.png
400 KB View Download
Project Member

Comment 5 by sheriffbot@chromium.org, Jan 25 2018

Cc: sc00335...@techmahindra.com
Labels: -Needs-Feedback
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

Comment 6 by tkent@chromium.org, Feb 5 2018

Components: -Blink>HTML Blink>Image
Labels: OS-Android OS-Chrome OS-Linux OS-Windows
Owner: y...@yoav.ws
Status: Assigned (was: Unconfirmed)
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.
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


Screen Shot 2018-02-07 at 4.16.33 PM.png
61.2 KB View Download

Comment 9 by y...@yoav.ws, Mar 15 2018

Status: WontFix (was: Assigned)
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