Triangulated image placeholders
tip is an easy-to-use, efficent, and lightweight library for triangulated image placeholders. It uses a highly-optimized format over 10x smaller than minified SVG. (Currently not production ready)
Check out this demo.
- Add the library to your HTML:
<head>
...
<script src="https://cdn.jsdelivr.net/gh/rh12503/tip@latest/lib/tip.min.js"></script>
</head>
- Change the
src
attribute todata-src
for any image with placeholders.
The library will look for the placeholder asset in the same location as the original image. To apply a blur filter on the placeholder, use the data-blur
attribute.
Placeholder assets have the same name as the original asset but with the extension .tri
. For example, image.png
would become image.tri
.
Install the GUI from the releases page.
In the future the command will be added to npx. Install the CLI using the command:
go get -u github.com/RH12503/tip-backend/tip
Generate the placeholder files by running
tip -in /path/to/image
or to process all images in a folder
tip -in /path/to/folder
The placeholder .tri
files will be created in the same location as the image files!
Every browser that has been updated within the last few years should be supported.
![]() |
![]() |
![]() |
![]() |
||
---|---|---|---|---|---|
26 | 9 | 12 | 16 | 12.1 | 10 |
All major mobile browsers are also supported including: Safari on iOS, Android WebView, Chrome Android & iOS, Firefox for Android, Opera Android, and Samsung Internet.
Thanks to for @bstncartwright for advice and implementing the original concept on his blog!