A new “major” update for this component is out, please update.
Key changes:
-
65% reduction in size
I moved away from the Masnory library and the component now uses colcade.js which is also written by David DeSandro - I also added waitForImages by Alexander Dickson - They are both released under the MIT license. The total gzipped size of the component is now just over 2.6kb.
-
No more http requests
Due to how lightweight everything is. I inlined all the scripts and this component now needs no http requests.
-
Pre-render the grid
Tiles will now pre-render the grid before images are loaded. This means the grid has a fixed height and each image knows its place before it loads and there won’t be any jumping around
.A pre-rendered grid looks like this:
and each image is gently faded into its slot when it’s done loading.
images are loaded sequentially and as soon as an image is done loading it shows up immediately.

