Remix.run Logo
Groxx 4 hours ago

Say you're a photo archiving app, and want to quickly show people something in their thumbnails when they fling back several years and tens of thousands of photos, into an area you haven't cached locally yet.

At 16 bytes per image, you can use this for even gigantic libraries with only a few megabytes. It becomes reasonable to just download and keep it all in memory at all times, so you can always show something vaguely representational instantly, rather than nothing but thousands of identical empty boxes. Often this is just a small nice-to-have bit of visual flair, but it can be useful too: I've been happy to have it when I was looking for moon pictures I knew I had taken, on a slow network, and they were super obvious to scroll to without having to wait for hundreds/thousands of thumbnails to download to find the right area. Instead I immediately found the dozen-ish I wanted and only had to download those to figure out the exact file I was looking for. (they're pretty easy to spot when you have a dozen that all look kind of similar in a row, compared to a whole bunch of things with wildly different colors for the rest of the week)

You can do similar things for showing placeholders on images in a website: it's so small you can just keep it right on the database row, and it won't be a performance or space concern on essentially any database, even for millions of users.