This project demonstrates how to generate a ThumbHash from an image using Node.js. The ThumbHash is a compact visual representation of an image, which can be used to create fast-loading, low-resolution thumbnails.
- Node.js installed on your system.
- An image file you want to generate a ThumbHash for.
-
Clone the repository or download the project files.
-
Install the required dependencies by running:
npm install
-
Place your image file in the images directory. By default, the script uses an image named combo-image.png, but you can change this in the index.js file.
-
Run the script to generate a ThumbHash:
node index.js
ThumbHash (Base64): <your-thumbhash-base64-string>