Srcset attribute may load larger images on mobile than desktop
The discussion revolves around the issue of loading large images on mobile devices, specifically in the context of the srcset attribute. jidanni initially raises the concern, citing a specific image that takes a long time to load on their cellphone screen due to its large size.
jidanni clarifies that the issue is not a bug, but rather a matter of bad User Experience, as the large image size can consume a significant amount of data. Stephen suggests that the issue may be related to the user’s ISP and peering, but jidanni counters that the image dimensions are larger than the entire cellphone screen.
The discussion takes a turn when Canapin discovers that the onebox loads a larger image on mobile (1380x920, 500 KB) compared to desktop (690x460, 160 KB). Arkshine explains that the srcset attribute serves images based on device pixel ratio, which can result in higher resolution images being loaded on mobile devices with higher pixel density.
Lilly and Canapin acknowledge that this behavior is not a bug, but rather a design choice based on device capability. jidanni reiterates their concern, suggesting that a smaller thumbnail size could be used without compromising the user experience.
The issue is eventually addressed with the merge of a PR that reduces the onebox thumbnail size for Wikimedia links blake. A more general fix for all oneboxes is also created, reducing the thumbnail size from around 400 KB to 100 KB blake.