
Product
Introducing Data Exports
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.
blurhash-from-url
Advanced tools
:unicorn: Simple utility to generate blurhash from Image URL

npm install blurhash-from-url --save
(or)
yarn add blurhash-from-url
//ES6 Import
import { blurhashFromURL } from "blurhash-from-url";
// Commonjs Import
// const { blurhashFromURL } = require("blurhash-from-url");
async function getBlurhash() {
const output = await blurhashFromURL("https://i.imgur.com/NhfEdg2.png");
console.log(output);
}
getBlurhash();
{
encoded: 'UnR.*,kW.TnPt7WBocozpJV@nMkWadofWCV@',
decoded: Uint8ClampedArray(1440000) [
255, 255, 251, 255, 255, 255, 251, 255, 255, 255, 251, 255,
255, 255, 251, 255, 255, 255, 251, 255, 255, 255, 251, 255,
255, 255, 251, 255, 255, 255, 251, 255, 255, 255, 251, 255,
255, 255, 251, 255, 255, 255, 250, 255, 255, 255, 250, 255,
255, 255, 250, 255, 255, 255, 250, 255, 255, 255, 250, 255,
255, 255, 250, 255, 255, 255, 250, 255, 255, 255, 250, 255,
255, 255, 250, 255, 255, 255, 250, 255, 255, 255, 250, 255,
255, 255, 250, 255, 255, 255, 250, 255, 255, 255, 250, 255,
255, 255, 250, 255,
... 1439900 more items
],
width: 600,
height: 600
}
By default, the image is resized to 32x32. You can pass the size as an optional parameter.
async function getBlurhash() {
const output = await blurhashFromURL("https://i.imgur.com/NhfEdg2.png", {
size: 64,
});
console.log(output);
}
I hope you find this useful. If you have any questions, please create an issue.
FAQs
Simple utility to generate blurhash from Image URL
The npm package blurhash-from-url receives a total of 313 weekly downloads. As such, blurhash-from-url popularity was classified as not popular.
We found that blurhash-from-url demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.

Research
/Security News
Bitwarden CLI 2026.4.0 was compromised in the Checkmarx supply chain campaign after attackers abused a GitHub Action in Bitwarden’s CI/CD pipeline.

Research
/Security News
Docker and Socket have uncovered malicious Checkmarx KICS images and suspicious code extension releases in a broader supply chain compromise.