lazy-simon.js

Languages and libraries

javascript library

SHOW HN2019

lazy-simon.js

The smallest and most narcissistic image lazyloading JavaScript library

lazy.simon-frey.eu

#lazy loading#javascript#intersection observer#image lazy load

10points
9comments
#1,798of 2,195 in 2019
Top 82%of 2019 by points

How HN took it

QuietFewer than 5 comments about the project

1 positive, 3 neutral or asking, 0 mixed, 0 critical, out of 4 comments about the project.

Idea: 1 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Tiny size and simplicity appreciated

    From 1 comment

Requests

  • Use native loading="lazy" when the browser supports it

    From 1 comment
    • Some browsers like chrome support this functionality natively by setting the image attribute loading="lazy" (https://web.dev/native-lazy-loading/) You could improve your library…
      alexza on HN
  • Smaller size via SVG placeholder and avoiding dataset calls

    From 1 comment
    • Use svg instead of that PNG and dataset not set/getattribute and you are down to 400
      phillipseamore on HN

Questions

  • Why an SVG placeholder changes image size on lazy load

    From 1 comment
    • When I use the svg in the img src, the image is higher as the original and thereby the size changes on lazy loading. Do you have a clue why? Used svg:…
      l1am0 on HN

Alternatives named

  • Native browser loading="lazy" attribute

    From 1 comment
    • Some browsers like chrome support this functionality natively by setting the image attribute loading="lazy" (https://web.dev/native-lazy-loading/) You could improve your library…
      alexza on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/21827328)