https://bugzilla.wikimedia.org/show_bug.cgi?id=56695

--- Comment #3 from Brion Vibber <[email protected]> ---
(In reply to comment #2)
> (In reply to comment #1)
> > One could maybe preload the small image (scaled large by the browser) to 
> > give
> > something for the user to look at well the big image is loaded.
> 
> That's actually not a horrible idea. It would be a little like the olden days
> of progressive jpeg images. You could take the thumb that is already inline
> in
> the page and stretch it out to the new size as a placeholder while the larger
> image is fetched.

+1 I endorse this approach. Same technique can be used when resizing the window
(or switching orientation on a tablet or mobile showing the desktop-mode site),
if you find it's best to fetch a new full-size image for the new window size.

It should be fairly straightforward to nab the src property from the thumbnail,
and since the resource is cached it'll display immediately... Then use an
offscreen image element (you can just create it in JS, no need to add to the
document) and wait for its onload (or onerror!) to fire before updating the
visible image with the full-size src.

Don't forget to show a spinner on top of the temporary image. :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to