Page MenuHomePhabricator

MultimediaViewer loads/preloads 3×2 images
Open, Needs TriagePublicBug

Description

Steps to Reproduce:

  1. Open network panel in developer tools
  2. Open https://commons.wikimedia.org/wiki/Category:Marktgraben#/media/File:Marktgraben_14_(IMG_1519).jpg

Actual Results:
Current image, next image and next-next image are loaded/preloaded. Each of the three images is transferred twice!
Having a large screen, 6×≈1MB are transferred when I only want to view a single image.
https://user-images.githubusercontent.com/782446/59180594-a2280400-8b65-11e9-8e15-ae9148ec70a0.png

Expected Results:
Only preload one image? Each image is transferred only once.

Event Timeline

simon04 created this task.Jun 10 2019, 7:52 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 10 2019, 7:52 AM
simon04 updated the task description. (Show Details)Jun 10 2019, 7:54 AM
Tgr added a subscriber: Tgr.Jun 10 2019, 8:01 AM

Double-loading is probably a regression from T77211: Check which browsers behave sanely with AJAX preloading.
No idea how preloading the next-next image would happen.

Change 516504 had a related patch set uploaded (by Simon04; owner: Simon04):
[mediawiki/extensions/MultimediaViewer@master] Remove XMLHttpRequest preloading

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

Change 516551 had a related patch set uploaded (by Simon04; owner: Simon04):
[mediawiki/extensions/MultimediaViewer@master] Convert XMLHttpRequest preload response to image

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

Tgr removed a subscriber: Tgr.Tue, Jul 9, 6:02 PM