mirror of
https://github.com/discourse/discourse.git
synced 2025-02-02 04:41:45 +08:00
662cfc416b
This generates a 10x10 PNG thumbnail for each lightboxed image. If Image Lazy Loading is enabled (IntersectionObserver API) then we'll load the low res version when offscreen. As the image scrolls in we'll swap it for the high res version. We use a WeakMap to track the old image attributes. It's much less memory than storing them as `data-*` attributes and swapping them back and forth all the time. |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |