Page MenuHomePhabricator

Mobile Wikipedia displays blurry thumbnails on hi-res devices
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:
The thumbnail image in the infobox is blurry. The thumbnail is loaded with 260px.

What should have happened instead?:
A higher resolution thumbnail is loaded. This could be accomplished using srcset (1.5x, 2x, 3x). To exclude low-speed networks, https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API could be evaluated.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:

  • OnePlus Nord with 1200px display width
  • Chrome 94 or Firefox 93 (private session)

Screenshot_20211010-151547.jpg (2×1 px, 567 KB)

Event Timeline

srcset was disabled on mobile web due to bandwidth concerns in T119797: Serve low-res images by default to users on slow or metered mobile connections. It might be time to re-evaluate that decision, especially considering the increase in prevalence of high-dpi mobile devices.

Jdlrobson subscribed.

See also T69709 and T69695
In short, the thumbnail landscape is pretty complicated. That said this is not really a mobile-specific problem. This is also a problem on desktop.

I remember when this change was done. One of the reasons was that we do not want to download extra bloat for users that could be paying per byte. This was also done before lazy loading of images was introduced. You can check sites like https://whatdoesmysitecost.com/test/211019_AiDc8D_c92a3e61768f4377bada46b18e334388#gniCost to see estimated cost. But with lazy loading it doesn't give a correct result. @Jdlrobson do you know if we have any statistics on how many images that are actually loaded per page load/total images that could be loaded?

Using the Network Information API is Android only and will not work on first page load. When the HTML page is downloaded, the pre load scanner in the browser scans the HTML for JS/CSS/images to start to download (to utilise the network) but using the network API, we need to change the HTML when the browser execute the JavaScript and that is something we want to avoid, since it could potentially make the browser download multiple versions of the same images, so the first view would give worse performance/size for the user. You can read more about the pre load scanner here.

I think we are missing something in our infrastructure/setup to make surfing Wikipedia on slow networks/cpu better where we would serve images/JS/CSS differently. If you haven't read how LinkedIn do it, its an interesting read. I'm thinking a larger initiative to fix that would be great.

In short, the thumbnail landscape is pretty complicated. That said this is not really a mobile-specific problem. This is also a problem on desktop.

I believe this task is about "blurry thumbnails on hi-res devices". This is a side-effect of disabling srcset, which we decided to for mobile, is controlled by wgMFStripResponsiveImages, and is applied by MobileFrontend for mobile and only on mobile.

If this problem is not mobile-specific, then what do you mean by "this problem", and in what way does it affect desktop?

wgMFStripResponsiveImages This literally annoys me every single time I open up the mobile website on my iPhone.. Do we actually still need this 7 years after we introduced it ?

We have lazy loaded images now , so the only thing we are really saving on, is bytesize of the HTML due to the stripping of the srcset attribute....

Ideally we'd have Save-Data support on iOS by now and we could vary the response on that, but since that still hasn't appeared after 7 years......what if we progressively enhance the lazy loaded image by setting srcset from the lazy loading script ? And maybe only if the image or page loaded within a certain timeframe, we add the srcset ?

Jdlrobson added a subscriber: ovasileva.

Firstly confirmed that this is a MobileFrontend issue. Apologies for the confusion. I think I must have confused this with the bug about the default image size.

I definitely think the MobileFrontend stripping is worth re-evaluating. It's not something I've given much thought to over the last few years.

My understanding is that any decision would need to be a joint recommendation by product (@ovasileva representing) and performance team.

Even with lazy loading, enabling srcset would increase the number of bytes downloaded for articles (minimally for articles with no images in the lead) but for users who read the articles, that would go up, but presumably with current web trends, this would be offsetted by things like Android's Data saver mode.

My understanding is part of the reason they were originally disabled was that in older devices srcset was leading to multiple downloads for certain images, but this should not be a problem in modern browsers. I also seem to recall some issues with memory that Peter may have flagged several years ago.

Technically obviously this is straightforward, but I think it requires a bit of thought, particularly for the regions with slower connections this optimization was designed for. If we wanted to we could probably assess APIs for conditionally adding them based on memory/connection speed (e.g. https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection comes to mind, but given it's experimental probably not the right one).

Retagged readers web backlog and performance team so this is not lost.

Reedy renamed this task from Mobile Wikipedia displays blurry thumbnails on hires devices to Mobile Wikipedia displays blurry thumbnails on hi-res devices.Mar 23 2022, 5:48 PM

My understanding is part of the reason they were originally disabled was that in older devices srcset was leading to multiple downloads for certain images, […]

I'm not aware of such malfunction having existed in browsers.

I am aware of a brief period in our own specific history, where we used client-side JavaScript (mediawiki.hidpi.js), which inherently causes duplicate downloads, and did so for all browsers (when on a HiDPI device). First the native one from img-src when the browser first renders and scans for resources to preload, and then another when our JS changed that attribute to the URL of a higher resolution image. This code was not used for browsers after 2015, and I removed it as unused in 2018.

The reasoning for this change to mobile web can be found in T119797. The task and conversation there specifically mention bandwidth and make no mention of duplicate downloads.

This is interesting from Smashing Magazine on how many (in %) of their users use Data-Saver option:
https://www.smashingmagazine.com/2022/03/signals-customizing-website-user-experience/#and-is-it-used

It would be interesting to see what it looks like for us.

Idea from @dpifke: Capture data saver mode client side in a Statsv metric.

I am aware of a brief period in our own specific history, where we used client-side JavaScript (mediawiki.hidpi.js), which inherently causes duplicate downloads, and did so for all browsers (when on a HiDPI device

That's probably what I'm recalling. Good memory!

@nray @SCherukuwada I am wondering if this would be a good opportunity for collaboration with the performance team?

This sounds interesting. My capacity is pretty limited right now though, and I most likely won't be able to engage with this much until after the visual regression test project

It's October, it's the one year anniversary of this bug report. Images are still blurry. The only subtask has been declined.

How to proceed? How to help out as a volunteer?

Trying to summarize the discussion above, please point out where incorrect:

The only reason we added wgMFStripResponsiveImages is to save bandwidth, given that srcset is checked against display capabilities and not bandwidth.

The only suggestion I'm seeing here that might address this is the bit where @TheDJ said "And maybe only if the image or page loaded within a certain timeframe, we add the srcset ?"

Is there another option, aside from just measuring how bad it will be if we turn wgMFStripResponsiveImages off and see if that's an easy fix?

@Krinkle Do you have a recommendation on how to measure the potential impact on experience/bandwidth for the affected users (regardless which option we chooose)?

@Krinkle I'm somewhat confused by what we're talking about re: data saver mode. There's this one: here? And there's the saveData API that isn't supported by Firefox and Safari. The former doesn't exist any more, and the latter isn't adopted.

Change 885362 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/MobileFrontend@master] Completely get rid of responsiveimages removal

https://gerrit.wikimedia.org/r/885362

Change 890127 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/extensions/MobileFrontend@master] Don't add srcset attribute to lazy loaded image element in data saver mode

https://gerrit.wikimedia.org/r/890127

@Krinkle Do you have a recommendation on how to measure the potential impact on experience/bandwidth for the affected users (regardless which option we chooose)?

I was curious and explored the effects that this change could have on html and image payload size because why not 😊

The mobile site lazy loads most of the content's images after it appears within (or close to) the viewport. But typically the user has to tap on a section to expand it first. Therefore, I was interested in exploring two scenarios:

  • Users who open one section and scroll all the way to the bottom of the page
  • Users who open all sections and scroll all they way to the bottom of the page

The first is probably a more likely scenario than the latter, but the latter gives a better idea of the most popular upper bound.

To do this, I wrote a script that did the following:

  • Downloaded the top 100 most popular pages for the month of January 2023
  • For each page, it saved a "before" and "after" version. The "before" version contained the untouched html from the production mobile site. The "after" version used the exact same HTML but added the srcset attribute to each lazy loaded image (copying the desktop site's behavior), which simulates the effect 885362 will have when merged.
  • Visited each page in a headless chromium browser simulating iPhone 11 behavior (e.g. using a device pixel ratio of 2)
  • Clicked one section or all the sections, and then scrolled to the bottom of the page
  • Recorded the sizes of the uncompressed html payload, compressed html payload, and total image payload.

These were the results:

Users who open one section

Out of the top 100 most popular pages for the month of January 2023:

  • The median difference in total uncompressed html size is 613 B, while the maximum is 20.34 kB (Cleopatra)
  • The median difference in total html transfer size (after gzip) is 71 B, while the maximum is 1.79 kB (Cleopatra)
  • The median difference in total image transfer size is 0 kB, while the maximum is 675.21 kB (Elvis Presley)
SlugBefore html sizeAfter html sizeDiff html sizeBefore html transfer sizeAfter html transfer sizeDiff html transfer sizeBefore image transfer sizeAfter image transfer sizeDiff image transfer size
:------------------------------------:---------------:--------------:-------------:------------------------:-----------------------:----------------------:-------------------------:------------------------:-----------------------
Varisu278.57 kB278.57 kB0 B48.8 kB48.8 kB0 B173.24 kB173.23 kB-9 B
The_Pale_Blue_Eye94.69 kB94.69 kB0 B22.35 kB22.35 kB0 B100.56 kB100.56 kB-4 B
Pedro_Pascal161.35 kB161.35 kB0 B33.46 kB33.46 kB0 B69.57 kB69.57 kB-4 B
XXX_(film_series)112.69 kB112.69 kB0 B25.29 kB25.29 kB0 B40.09 kB40.09 kB-3 B
Ginny_and_Georgia181.72 kB181.72 kB0 B43.4 kB43.4 kB0 B67.49 kB67.49 kB-2 B
Priscilla_Presley197.39 kB198.75 kB1.36 kB45.92 kB46.05 kB124 B74.67 kB74.67 kB-1 B
Riley_Keough249.52 kB249.84 kB319 B47.88 kB47.91 kB34 B44.68 kB44.68 kB-1 B
The_Menu_(2022_film)153.2 kB153.43 kB231 B30.78 kB30.8 kB24 B143.22 kB143.22 kB-1 B
Jeff_Beck265.12 kB266.94 kB1.82 kB57.45 kB57.63 kB186 B59.82 kB59.82 kB-1 B
Index_Washington34.44 kB34.44 kB0 B9.88 kB9.88 kB0 B57.28 kB57.28 kB-1 B
Austin_Butler223.03 kB223.51 kB480 B38.17 kB38.22 kB53 B110.96 kB110.96 kB-1 B
Jennifer_Coolidge204.61 kB204.69 kB87 B42.22 kB42.24 kB16 B76.91 kB76.91 kB-1 B
Patrick_Mahomes435.48 kB437.13 kB1.66 kB74.27 kB74.41 kB145 B90.22 kB90.22 kB-1 B
Brendan_Fraser262.95 kB263.76 kB817 B46.5 kB46.6 kB103 B83.62 kB83.62 kB-1 B
List_of_highest-grossing_Indian_films814.85 kB814.85 kB0 B119.95 kB119.95 kB0 B27.05 kB27.05 kB-1 B
Tom_Cruise353.77 kB356.66 kB2.89 kB67.69 kB67.96 kB270 B47.54 kB47.53 kB-1 B
Yellowstone_(American_TV_series)278.25 kB279.04 kB781 B52.08 kB52.22 kB138 B70.99 kB70.99 kB-1 B
Steven_Spielberg677.43 kB680.71 kB3.28 kB124.8 kB125.11 kB306 B60.34 kB60.34 kB-1 B
Index_(statistics)53.14 kB53.14 kB0 B15.19 kB15.19 kB0 B59.85 kB59.85 kB0 B
XXX:_Return_of_Xander_Cage162.32 kB162.32 kB0 B35.11 kB35.11 kB0 B75.54 kB75.54 kB0 B
Pathaan_(film)315.97 kB316.58 kB611 B50.4 kB50.43 kB29 B206.15 kB206.15 kB0 B
Cleopatra791.46 kB811.79 kB20.34 kB141.2 kB142.99 kB1.79 kB68.82 kB68.82 kB0 B
Avatar:_The_Way_of_Water574.69 kB577.17 kB2.48 kB102.1 kB102.32 kB218 B51.65 kB51.65 kB0 B
Jenna_Ortega277.74 kB277.97 kB227 B52.72 kB52.79 kB64 B71.16 kB71.16 kB0 B
ChatGPT235.26 kB236.83 kB1.56 kB48.7 kB48.83 kB132 B52.15 kB52.15 kB0 B
Andrew_Tate316.53 kB316.74 kB217 B57.04 kB57.07 kB22 B56.12 kB56.12 kB0 B
Kai_the_Hatchet-Wielding_Hitchhiker82.6 kB82.6 kB0 B20.11 kB20.11 kB0 B46.21 kB46.21 kB0 B
Brock_Purdy172.53 kB172.78 kB251 B34.64 kB34.68 kB35 B95.67 kB95.67 kB0 B
Index_(economics)69.7 kB69.7 kB0 B18.82 kB18.82 kB0 B28.66 kB28.66 kB0 B
Navarone_Garibaldi53.2 kB53.2 kB0 B14.45 kB14.45 kB0 B60.93 kB60.93 kB0 B
Republic_Day_(India)88.21 kB90.34 kB2.13 kB21.21 kB21.39 kB181 B77.46 kB77.46 kB0 B
The_White_Lotus356.7 kB356.7 kB0 B64.71 kB64.71 kB0 B112.5 kB112.5 kB0 B
Wednesday_(TV_series)267.24 kB267.87 kB630 B50.39 kB50.45 kB65 B188.07 kB188.07 kB0 B
Bernie_Madoff426.59 kB426.59 kB0 B83.6 kB83.6 kB0 B52.95 kB52.95 kB0 B
Thunivu281.29 kB281.29 kB0 B48.68 kB48.68 kB0 B158.95 kB158.95 kB0 B
Avatar_(2009_film)705.18 kB707.23 kB2.05 kB135.09 kB135.35 kB259 B43.75 kB43.75 kB0 B
XXXX36.03 kB36.03 kB0 B11.08 kB11.08 kB0 B28.85 kB28.85 kB0 B
Bella_Ramsey140.56 kB140.56 kB0 B28.05 kB28.05 kB0 B77.04 kB77.04 kB0 B
Joe_Burrow325.09 kB327.77 kB2.68 kB60.03 kB60.3 kB275 B147.72 kB147.72 kB0 B
George_Santos552.35 kB552.35 kB0 B112.43 kB112.43 kB0 B59.1 kB59.1 kB0 B
The_Banshees_of_Inisherin168.83 kB171.23 kB2.4 kB35.21 kB35.4 kB192 B67.01 kB67.01 kB0 B
Everything_Everywhere_All_at_Once265.29 kB267.71 kB2.42 kB49.91 kB50.16 kB243 B61.3 kB61.3 kB0 B
XXX_(2002_film)93.35 kB93.35 kB0 B25.14 kB25.14 kB0 B54.31 kB54.31 kB0 B
Puss_in_Boots:_The_Last_Wish274.17 kB274.49 kB318 B48.64 kB48.72 kB77 B55.32 kB55.32 kB0 B
Annie_Wersching81.14 kB81.37 kB239 B19.5 kB19.53 kB32 B55.52 kB55.52 kB0 B
Liam_Hemsworth153.66 kB154.22 kB554 B32.51 kB32.57 kB60 B60.52 kB60.52 kB0 B
Stetson_Bennett131.93 kB131.93 kB0 B26.95 kB26.95 kB0 B133.03 kB133.03 kB0 B
David_Crosby356.14 kB358.99 kB2.85 kB69.76 kB70.04 kB285 B77.83 kB77.83 kB0 B
Premier_League728.83 kB730.95 kB2.12 kB116.25 kB116.46 kB205 B108.38 kB108.38 kB0 B
Aubrey_Plaza229.42 kB230.25 kB825 B42.66 kB42.76 kB103 B52.44 kB52.44 kB0 B
That_'90s_Show115.03 kB115.03 kB0 B26.84 kB26.84 kB0 B205.17 kB205.17 kB0 B
Anya_Taylor-Joy225.38 kB226 kB614 B44.2 kB44.28 kB80 B54.4 kB54.4 kB0 B
2023_Men's_FIH_Hockey_World_Cup780.22 kB781.07 kB853 B54.07 kB54.13 kB62 B83.99 kB83.99 kB0 B
Knives_Out242.36 kB242.75 kB387 B44.02 kB44.05 kB37 B66.11 kB66.11 kB0 B
Shakira574.88 kB576.99 kB2.11 kB114.62 kB114.85 kB230 B168.05 kB168.05 kB0 B
RRR_(film)725.53 kB728.58 kB3.05 kB129.67 kB129.91 kB237 B55.1 kB55.1 kB0 B
Justin_Roiland151.5 kB152.06 kB558 B31.24 kB31.3 kB61 B54.19 kB54.19 kB0 B
Jalen_Hurts198.43 kB199.87 kB1.44 kB38.86 kB39 kB142 B148.41 kB148.41 kB0 B
Ke_Huy_Quan212.66 kB212.94 kB271 B34.74 kB34.77 kB29 B56.11 kB56.11 kB0 B
John_Stonehouse129.12 kB129.48 kB363 B31.42 kB31.46 kB48 B47.53 kB47.53 kB0 B
Brianne_Howey66.96 kB66.96 kB0 B17.5 kB17.5 kB0 B36.57 kB36.57 kB0 B
Michael_Lockwood_(guitarist)70.19 kB70.19 kB0 B18.16 kB18.16 kB0 B66 kB66 kB0 B
Bigg_Boss_(Tamil_season_6)211.06 kB211.06 kB0 B43.38 kB43.38 kB0 B39.99 kB39.99 kB0 B
Veera_Simha_Reddy109.46 kB109.46 kB0 B25.05 kB25.05 kB0 B63.99 kB63.99 kB0 B
The_Whale_(2022_film)214.81 kB215.3 kB490 B39.63 kB39.69 kB61 B138.26 kB138.26 kB0 B
Barbara_Walters289.22 kB291.8 kB2.58 kB55.63 kB55.9 kB275 B51.12 kB51.12 kB0 B
Tom_Brady1.11 MB1.12 MB5.26 kB177.73 kB178.29 kB561 B183.1 kB183.1 kB0 B
Jeremy_Renner194.24 kB194.8 kB558 B41.51 kB41.64 kB135 B50.39 kB50.39 kB1 B
M3GAN153.32 kB154.11 kB793 B33.1 kB33.2 kB95 B125.53 kB125.53 kB1 B
XXXTentacion719.53 kB724.18 kB4.64 kB127.09 kB127.57 kB482 B75.8 kB75.8 kB1 B
Cristiano_Ronaldo1.16 MB1.17 MB9.74 kB187.23 kB188.24 kB1.01 kB112 kB112 kB1 B
Deaths_in_2023388.57 kB388.57 kB0 B97.16 kB97.16 kB0 B25.77 kB25.77 kB1 B
Kevin_McCarthy414.52 kB418.17 kB3.65 kB81.72 kB82.06 kB348 B97.63 kB97.63 kB1 B
Death_of_Tyre_Nichols246.36 kB246.7 kB343 B46.39 kB46.41 kB20 B152.35 kB152.35 kB1 B
Novak_Djokovic1.06 MB1.07 MB4.29 kB176.81 kB177.25 kB441 B118.3 kB118.31 kB1 B
Kaleidoscope_(American_TV_series)96.19 kB96.19 kB0 B23.84 kB23.84 kB0 B81.53 kB81.53 kB1 B
Waltair_Veerayya137.02 kB137.02 kB0 B28.67 kB28.67 kB0 B58.47 kB58.47 kB2 B
List_of_highest-grossing_films982.92 kB984.03 kB1.11 kB156.5 kB156.62 kB119 B77.65 kB95.78 kB18.13 kB
The_Last_of_Us515.33 kB517.36 kB2.03 kB84.2 kB84.42 kB220 B73.28 kB95.94 kB22.67 kB
List_of_Super_Bowl_champions357.54 kB358.02 kB487 B51.52 kB51.58 kB60 B76.47 kB101.36 kB24.89 kB
Lisa_Marie_Presley292.39 kB293.09 kB703 B55.52 kB55.59 kB76 B82.13 kB107.76 kB25.63 kB
Instagram781.84 kB782.95 kB1.1 kB137.44 kB137.55 kB104 B132.54 kB160.2 kB27.66 kB
Royal_Rumble_(2023)195.75 kB196.6 kB849 B41.18 kB41.26 kB85 B77.57 kB105.97 kB28.4 kB
Edgar_Allan_Poe324.17 kB327.03 kB2.86 kB68.51 kB68.85 kB340 B83.01 kB111.71 kB28.7 kB
Damar_Hamlin236.39 kB236.63 kB243 B43.7 kB43.72 kB22 B107.61 kB141.23 kB33.62 kB
Ansel_Adams362.89 kB372.31 kB9.42 kB72 kB72.87 kB866 B113.66 kB147.93 kB34.26 kB
Glass_Onion:_A_Knives_Out_Mystery215.96 kB217.19 kB1.24 kB42.21 kB42.33 kB123 B200.1 kB237.15 kB37.05 kB
Miss_Universe_2022326.57 kB327.07 kB498 B54.95 kB55.01 kB55 B183.27 kB222.34 kB39.07 kB
Lionel_Messi1.16 MB1.17 MB9.63 kB200.75 kB201.85 kB1.1 kB126.9 kB168.79 kB41.88 kB
The_Last_of_Us_(TV_series)736.21 kB743.55 kB7.34 kB123.94 kB124.75 kB815 B61.85 kB115.11 kB53.26 kB
Elizabeth_II662.98 kB674.47 kB11.49 kB118.71 kB119.58 kB869 B106.16 kB172.61 kB66.45 kB
Martin_Luther_King_Jr.924.24 kB934.09 kB9.85 kB180.26 kB181.13 kB872 B102.34 kB180.69 kB78.35 kB
Al_Nassr_FC448.04 kB448.53 kB495 B45.57 kB45.61 kB49 B137.24 kB216 kB78.76 kB
Sex264.85 kB266.53 kB1.68 kB54.47 kB54.65 kB176 B189.07 kB272.28 kB83.21 kB
Ken_Block278.33 kB279.44 kB1.12 kB44.59 kB44.69 kB97 B130.42 kB250.36 kB119.94 kB
Australian_Open337.19 kB342.89 kB5.7 kB49.03 kB49.49 kB464 B115.58 kB287.07 kB171.48 kB
Miley_Cyrus777.17 kB781.25 kB4.08 kB143.23 kB143.59 kB361 B178.66 kB376.98 kB198.32 kB
Wikipedia1.03 MB1.03 MB4.91 kB192.11 kB192.58 kB470 B425.07 kB633.08 kB208 kB
Michael_Jackson896.3 kB902.78 kB6.48 kB169.48 kB170.12 kB632 B408.09 kB981.75 kB573.66 kB
Elvis_Presley763.61 kB770.44 kB6.82 kB163.72 kB164.38 kB656 B373.38 kB1.05 MB675.21 kB
Median diff html sizeMax diff html sizeMedian diff html transfer sizeMax diff html transfer diffMedian diff image transfer sizeMax diff image transfer size
:--------------------:-----------------:-----------------------------:--------------------------:------------------------------:---------------------------
613 B20.34 kB71 B1.79 kB0 B675.21 kB

Users who open all sections

Out of the top 100 most popular pages for the month of January 2023:

  • The median difference in total uncompressed html size is 613 B, while the maximum is 20.34 kB (Cleopatra)
  • The median difference in total html transfer size (after gzip) is 70 B, while the maximum is 1.79 kB (Cleopatra)
  • The median difference in total image transfer size is 74.51 kB, while the maximum is 1.47 MB (Cleopatra)
PageBefore html sizeAfter html sizeDiff html sizeBefore html transfer sizeAfter html transfer sizeDiff html transfer sizeBefore image transfer sizeAfter image transfer sizeDiff image transfer size
:------------------------------------:---------------:--------------:-------------:------------------------:-----------------------:----------------------:-------------------------:------------------------:-----------------------
Index_Washington34.44 kB34.44 kB0 B9.87 kB9.87 kB0 B57.28 kB57.28 kB-1 B
XXX_(2002_film)93.35 kB93.35 kB0 B25.14 kB25.14 kB0 B60.49 kB60.49 kB-1 B
That_'90s_Show115.03 kB115.03 kB0 B26.84 kB26.84 kB0 B208.03 kB208.03 kB-1 B
List_of_highest-grossing_Indian_films814.85 kB814.85 kB0 B119.95 kB119.95 kB0 B29.57 kB29.57 kB-1 B
Index_(statistics)53.14 kB53.14 kB0 B15.19 kB15.19 kB0 B65.21 kB65.21 kB0 B
XXX:_Return_of_Xander_Cage162.32 kB162.32 kB0 B35.11 kB35.11 kB0 B81.47 kB81.47 kB0 B
Varisu278.57 kB278.57 kB0 B48.8 kB48.8 kB0 B179.24 kB179.24 kB0 B
Kai_the_Hatchet-Wielding_Hitchhiker82.6 kB82.6 kB0 B20.11 kB20.11 kB0 B47.67 kB47.67 kB0 B
Index_(economics)69.7 kB69.7 kB0 B18.82 kB18.82 kB0 B30.11 kB30.11 kB0 B
Deaths_in_2023390.29 kB390.29 kB0 B97.5 kB97.5 kB0 B27.23 kB27.23 kB0 B
Navarone_Garibaldi53.2 kB53.2 kB0 B14.45 kB14.45 kB0 B62.39 kB62.39 kB0 B
Bernie_Madoff426.59 kB426.59 kB0 B83.6 kB83.6 kB0 B81.71 kB81.71 kB0 B
XXXX36.03 kB36.03 kB0 B11.08 kB11.08 kB0 B30.92 kB30.92 kB0 B
The_Pale_Blue_Eye94.69 kB94.69 kB0 B22.35 kB22.35 kB0 B110.65 kB110.65 kB0 B
Bella_Ramsey140.56 kB140.56 kB0 B28.05 kB28.05 kB0 B68.68 kB68.68 kB0 B
XXX_(film_series)112.69 kB112.69 kB0 B25.29 kB25.29 kB0 B54.54 kB54.54 kB0 B
Ginny_and_Georgia181.72 kB181.72 kB0 B43.4 kB43.4 kB0 B70.35 kB70.35 kB0 B
Kaleidoscope_(American_TV_series)96.19 kB96.19 kB0 B23.84 kB23.84 kB0 B84.39 kB84.39 kB0 B
Waltair_Veerayya137.02 kB137.02 kB0 B28.67 kB28.67 kB0 B61.33 kB61.33 kB0 B
Michael_Lockwood_(guitarist)70.19 kB70.19 kB0 B18.16 kB18.16 kB0 B67.28 kB67.28 kB0 B
Bigg_Boss_(Tamil_season_6)211.06 kB211.06 kB0 B43.38 kB43.38 kB0 B42.72 kB42.72 kB0 B
Thunivu281.29 kB281.29 kB0 B48.68 kB48.68 kB0 B164.94 kB164.94 kB1 B
The_White_Lotus356.7 kB356.7 kB0 B64.71 kB64.71 kB0 B116.63 kB116.63 kB1 B
George_Santos552.35 kB552.35 kB0 B112.43 kB112.43 kB0 B66.45 kB66.46 kB1 B
Pedro_Pascal161.35 kB161.35 kB0 B33.46 kB33.46 kB0 B94.64 kB94.64 kB1 B
Stetson_Bennett131.93 kB131.93 kB0 B26.95 kB26.95 kB0 B133.02 kB133.03 kB1 B
Brianne_Howey66.96 kB66.96 kB0 B17.5 kB17.5 kB0 B39.31 kB39.31 kB1 B
Veera_Simha_Reddy109.46 kB109.46 kB0 B25.05 kB25.05 kB0 B65.45 kB65.45 kB1 B
John_Stonehouse129.12 kB129.48 kB363 B31.42 kB31.46 kB48 B59.47 kB72.01 kB12.55 kB
Jennifer_Coolidge204.61 kB204.69 kB87 B42.22 kB42.24 kB16 B106.26 kB120.81 kB14.55 kB
Jenna_Ortega277.74 kB277.97 kB227 B52.72 kB52.79 kB64 B96.9 kB113.54 kB16.64 kB
Annie_Wersching81.14 kB81.37 kB239 B19.5 kB19.53 kB32 B76.92 kB102.77 kB25.85 kB
Brock_Purdy172.53 kB172.78 kB251 B34.64 kB34.68 kB35 B126.15 kB154.79 kB28.64 kB
Andrew_Tate316.53 kB316.74 kB217 B57.04 kB57.07 kB22 B76.63 kB105.43 kB28.8 kB
Wednesday_(TV_series)267.24 kB267.87 kB630 B50.39 kB50.45 kB64 B212.67 kB242.17 kB29.51 kB
The_Menu_(2022_film)153.2 kB153.43 kB231 B30.78 kB30.8 kB24 B166.08 kB196.22 kB30.15 kB
Ke_Huy_Quan212.66 kB212.94 kB271 B34.74 kB34.77 kB29 B80.61 kB111.47 kB30.87 kB
Knives_Out242.36 kB242.75 kB387 B44.02 kB44.05 kB37 B89.33 kB125.09 kB35.77 kB
Riley_Keough249.52 kB249.84 kB319 B47.88 kB47.91 kB34 B67.71 kB107.96 kB40.25 kB
Justin_Roiland151.5 kB152.06 kB558 B31.24 kB31.3 kB61 B113.56 kB154.94 kB41.38 kB
Pathaan_(film)315.97 kB316.58 kB611 B50.4 kB50.43 kB30 B250.44 kB293.38 kB42.94 kB
The_Whale_(2022_film)215.54 kB216.03 kB490 B39.76 kB39.81 kB50 B166.78 kB209.71 kB42.94 kB
Liam_Hemsworth153.66 kB154.22 kB554 B32.51 kB32.57 kB60 B97.45 kB147.13 kB49.68 kB
Anya_Taylor-Joy225.38 kB226 kB614 B44.2 kB44.28 kB80 B96.54 kB150.01 kB53.47 kB
Damar_Hamlin236.39 kB236.63 kB243 B43.7 kB43.72 kB22 B168.88 kB228.9 kB60.02 kB
Puss_in_Boots:_The_Last_Wish274.17 kB274.49 kB318 B48.64 kB48.72 kB77 B115.77 kB176.17 kB60.4 kB
List_of_Super_Bowl_champions357.54 kB358.02 kB487 B51.52 kB51.58 kB60 B106.03 kB169.02 kB62.99 kB
Brendan_Fraser262.95 kB263.76 kB817 B46.5 kB46.6 kB103 B126.05 kB189.75 kB63.7 kB
Death_of_Tyre_Nichols246.36 kB246.7 kB343 B46.39 kB46.41 kB20 B193.35 kB258.08 kB64.72 kB
Austin_Butler223.03 kB223.51 kB480 B38.17 kB38.22 kB53 B150.76 kB225 kB74.24 kB
Jeremy_Renner194.24 kB194.8 kB558 B41.51 kB41.64 kB135 B100.88 kB175.66 kB74.78 kB
Miss_Universe_2022326.57 kB327.07 kB498 B54.95 kB55 kB53 B332.02 kB408.86 kB76.84 kB
Yellowstone_(American_TV_series)278.25 kB279.04 kB781 B52.08 kB52.22 kB138 B112.27 kB191.03 kB78.76 kB
Royal_Rumble_(2023)195.75 kB196.6 kB849 B41.18 kB41.26 kB85 B107.5 kB187.76 kB80.26 kB
Lisa_Marie_Presley292.39 kB293.09 kB703 B55.52 kB55.59 kB76 B113.43 kB197.33 kB83.9 kB
Aubrey_Plaza229.42 kB230.25 kB825 B42.66 kB42.76 kB103 B107.58 kB194.95 kB87.37 kB
The_Banshees_of_Inisherin168.84 kB171.24 kB2.4 kB35.22 kB35.42 kB195 B142.02 kB252.54 kB110.52 kB
Ken_Block278.33 kB279.44 kB1.12 kB44.59 kB44.69 kB97 B164.29 kB284.22 kB119.93 kB
Avatar:_The_Way_of_Water574.69 kB577.17 kB2.48 kB102.1 kB102.32 kB218 B135.77 kB258.17 kB122.4 kB
List_of_highest-grossing_films982.92 kB984.03 kB1.11 kB156.5 kB156.62 kB119 B179.95 kB303.47 kB123.53 kB
Al_Nassr_FC448.04 kB448.53 kB495 B45.57 kB45.61 kB49 B256.74 kB380.67 kB123.93 kB
Instagram781.84 kB782.95 kB1.1 kB137.44 kB137.55 kB104 B206.79 kB335.6 kB128.81 kB
Priscilla_Presley197.39 kB198.75 kB1.36 kB45.92 kB46.05 kB124 B157.71 kB299.08 kB141.37 kB
Everything_Everywhere_All_at_Once265.28 kB267.71 kB2.42 kB49.91 kB50.15 kB242 B177.74 kB334.34 kB156.61 kB
Glass_Onion:_A_Knives_Out_Mystery215.96 kB217.19 kB1.24 kB42.21 kB42.33 kB123 B269.02 kB452.97 kB183.94 kB
The_Last_of_Us515.33 kB517.36 kB2.03 kB84.2 kB84.42 kB220 B189.06 kB384.29 kB195.23 kB
Shakira574.88 kB576.99 kB2.11 kB114.62 kB114.85 kB230 B292.83 kB495.31 kB202.48 kB
Jeff_Beck265.12 kB266.94 kB1.82 kB57.45 kB57.63 kB186 B176.43 kB383.26 kB206.83 kB
Sex264.85 kB266.53 kB1.68 kB54.47 kB54.65 kB176 B386.26 kB596.53 kB210.28 kB
Tom_Cruise353.77 kB356.66 kB2.89 kB67.69 kB67.96 kB270 B208.93 kB435.14 kB226.21 kB
David_Crosby356.14 kB358.99 kB2.85 kB69.76 kB70.04 kB285 B209.88 kB443.58 kB233.7 kB
Jalen_Hurts198.49 kB199.93 kB1.44 kB38.89 kB39.03 kB144 B270.83 kB506.75 kB235.93 kB
Premier_League728.94 kB731.06 kB2.12 kB116.22 kB116.42 kB202 B823.44 kB1.08 MB259.46 kB
Barbara_Walters289.22 kB291.8 kB2.58 kB55.63 kB55.9 kB275 B198.29 kB458.47 kB260.18 kB
2023_Men's_FIH_Hockey_World_Cup780.22 kB781.07 kB853 B54.07 kB54.13 kB62 B361.47 kB642.14 kB280.67 kB
RRR_(film)725.53 kB728.58 kB3.05 kB129.67 kB129.91 kB237 B200.97 kB498.12 kB297.14 kB
Republic_Day_(India)88.21 kB90.34 kB2.13 kB21.21 kB21.39 kB181 B220.94 kB521.17 kB300.23 kB
Kevin_McCarthy414.52 kB418.17 kB3.65 kB81.72 kB82.06 kB348 B288.15 kB591.19 kB303.04 kB
Avatar_(2009_film)705.18 kB707.23 kB2.05 kB135.09 kB135.35 kB259 B180.99 kB484.31 kB303.32 kB
Miley_Cyrus777.17 kB781.25 kB4.08 kB143.23 kB143.59 kB361 B251.01 kB576.46 kB325.45 kB
ChatGPT235.61 kB237.18 kB1.56 kB48.76 kB48.89 kB132 B225.96 kB554.67 kB328.72 kB
M3GAN153.33 kB154.12 kB793 B33.11 kB33.21 kB95 B265.51 kB611.04 kB345.54 kB
Patrick_Mahomes435.48 kB437.13 kB1.66 kB74.27 kB74.41 kB145 B306.5 kB710.72 kB404.21 kB
Steven_Spielberg677.43 kB680.71 kB3.28 kB124.8 kB125.11 kB306 B255.58 kB707.91 kB452.33 kB
Edgar_Allan_Poe324.17 kB327.03 kB2.86 kB68.51 kB68.85 kB340 B299.57 kB757.74 kB458.18 kB
Joe_Burrow325.09 kB327.77 kB2.68 kB60.03 kB60.3 kB275 B418.45 kB938.67 kB520.22 kB
Novak_Djokovic1.06 MB1.07 MB4.29 kB176.82 kB177.26 kB441 B452.65 kB1.05 MB595.6 kB
Australian_Open337.19 kB342.89 kB5.7 kB49.03 kB49.49 kB464 B372.99 kB997.5 kB624.51 kB
Tom_Brady1.11 MB1.12 MB5.26 kB177.73 kB178.3 kB562 B674.82 kB1.51 MB837.56 kB
Wikipedia1.03 MB1.03 MB4.91 kB192.11 kB192.58 kB470 B1.07 MB1.93 MB856.46 kB
Michael_Jackson896.3 kB902.78 kB6.48 kB169.48 kB170.12 kB632 B579.07 kB1.46 MB880.42 kB
Elizabeth_II662.98 kB674.47 kB11.49 kB118.71 kB119.58 kB869 B693.49 kB1.58 MB891.29 kB
Elvis_Presley763.61 kB770.44 kB6.82 kB163.72 kB164.38 kB656 B536.08 kB1.5 MB959.05 kB
Martin_Luther_King_Jr.924.24 kB934.09 kB9.85 kB180.26 kB181.13 kB872 B638.17 kB1.81 MB1.17 MB
Cristiano_Ronaldo1.16 MB1.17 MB9.74 kB187.21 kB188.22 kB1.01 kB783.41 kB2.04 MB1.26 MB
XXXTentacion719.53 kB724.18 kB4.64 kB127.09 kB127.57 kB482 B649.45 kB1.92 MB1.27 MB
Lionel_Messi1.16 MB1.17 MB9.63 kB200.76 kB201.86 kB1.1 kB793.76 kB2.14 MB1.35 MB
Ansel_Adams362.89 kB372.31 kB9.42 kB72 kB72.87 kB866 B682.92 kB2.09 MB1.4 MB
The_Last_of_Us_(TV_series)736.2 kB743.54 kB7.34 kB123.95 kB124.76 kB815 B656.8 kB2.06 MB1.4 MB
Cleopatra791.46 kB811.79 kB20.34 kB141.2 kB142.99 kB1.79 kB850.2 kB2.32 MB1.47 MB
Median diff html sizeMax diff html sizeMedian diff html transfer sizeMax diff html transfer diffMedian diff image transfer sizeMax diff image transfer size
:--------------------:-----------------:-----------------------------:--------------------------:------------------------------:---------------------------
613 B20.34 kB70 B1.79 kB74.51 kB1.47 MB

Conclusion

Adding the srcset attribute to the lazy loaded images resulted in small increases in HTML size (71 B median increase in compressed transfer size, 613 B median increase in uncompressed transfer size) and larger increases in image payload size (0 B median increase when one section is opened and 74.51 kB median increase when all sections are opened).

  • We can mitigate the effects of the image payload increase by taking advantage of data saver mode
  • My script just measured the effects this change has on image/html payload, but it will be interesting to see the effects it has on other metrics (e.g. html parse time) from our synthetic test results

Change 890509 had a related patch set uploaded (by Nray; author: Nray):

[operations/mediawiki-config@master] Add static "Cleopatra" page to facilitate synthetic testing of 885362

https://gerrit.wikimedia.org/r/890509

Change 885362 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Completely get rid of responsiveimages removal

https://gerrit.wikimedia.org/r/885362

Change 890509 merged by jenkins-bot:

[operations/mediawiki-config@master] Add static "Cleopatra" page to facilitate synthetic testing of 885362

https://gerrit.wikimedia.org/r/890509

Mentioned in SAL (#wikimedia-operations) [2023-02-21T21:08:29Z] <catrope@deploy1002> Started scap: Backport for [[gerrit:890509|Add static "Cleopatra" page to facilitate synthetic testing of 885362 (T326147 T293303)]]

Mentioned in SAL (#wikimedia-operations) [2023-02-21T21:10:23Z] <catrope@deploy1002> catrope and nray: Backport for [[gerrit:890509|Add static "Cleopatra" page to facilitate synthetic testing of 885362 (T326147 T293303)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-02-21T21:18:58Z] <catrope@deploy1002> Finished scap: Backport for [[gerrit:890509|Add static "Cleopatra" page to facilitate synthetic testing of 885362 (T326147 T293303)]] (duration: 10m 28s)

Change 890127 abandoned by Nray:

[mediawiki/extensions/MobileFrontend@master] Don't add srcset attribute to lazy loaded image element in data saver mode

Reason:

https://gerrit.wikimedia.org/r/890127

Change 891982 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/MobileFrontend@wmf/1.40.0-wmf.24] Completely get rid of responsiveimages removal

https://gerrit.wikimedia.org/r/891982

Change 891982 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@wmf/1.40.0-wmf.24] Completely get rid of responsiveimages removal

https://gerrit.wikimedia.org/r/891982

nray claimed this task.

The srcset attribute was added on the mobile site as part of T326147 and was deployed everywhere on Feb 27. Therefore, I'm marking this as resolved

Change 893542 had a related patch set uploaded (by Nray; author: Nray):

[operations/mediawiki-config@master] Revert "Add static "Cleopatra" page to facilitate synthetic testing of 885362"

https://gerrit.wikimedia.org/r/893542