
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
visionary-image
Advanced tools
React image component with built-in Blurhash placeholders for better UX and Core Web Vitals.
React image component with built-in Blurhash placeholders for better UX and Core Web Vitals.
visionary-url."We highly recommend site owners achieve good Core Web Vitals for success with Search" — Google Search Central
Lighthouse report filmstrip showing three-layer image loading process
Install via npm, yarn, or pnpm.
npm install --save visionary-image
Begin by creating a Visionary image URL. This is then passed to the src prop of the Image component.
There are several ways to create a Visionary URL.
import { Image } from "visionary-image";
const ImageDetails = () => <Image alt="..." src="<Visionary URL>" />;
| Name | Description |
|---|---|
alt string | Image alt tag. Adding alt text to images is highly recommended to accommodate accessible devices and improve discoverability. |
bgColorAlpha number | Base layer (background color) alpha channel. Default: 0.7 |
className string | Classname applied to the container div or the fallback img element. |
debug boolean | Prints handy debug info to the console (Visionary URL data, render times). |
disableBlurLayer boolean | Disables rendering of the blur (canvas) layer. |
disableImageLayer boolean | Disables rendering of the image layer. |
height number, string | If set, will override internally computed image height. By default, Visionary renders optimally sized images, using the aspect-ratio and max-width placeholder data. |
hideImageLayer boolean | Hides the image layer, revealing the blur layer underneath. |
lazy boolean | Should image load lazily. Default: true |
onClick function | Callback function to invoke when the image is clicked. function. |
onError function | Error callback function. |
onLoad function | Image loaded callback function. |
preventDrag boolean | Prevents user from dragging the image element. |
preventSelection boolean | Prevents user from highlighting the image element. |
punch number | Blurhash punch parameter. Default: 1 |
src string | Visionary URL, Visionary Code, or ordinary image URL. If src contains Visionary data, placeholders will be rendered, otherwise falls back to an img element. required |
width number, string | If set, will override internally computed image width. By default, Visionary renders optimally sized images, using the aspect-ratio and max-width placeholder data. |
Yes, Visionary Image supports server-side rendering (SSR) and static site generation (SSG), as well as client-side rendering. In server-rendered scenarios, the first layer (background color) renders immediately, followed by the Blurhash and image layers once the page loads in the client's browser.
Canvas operations are highly efficient in modern browsers. Rendering the 24x24 pixel Blurhash placeholder typically takes around 1ms.
Blurhash uses Discrete Cosine Transforms to represent a color-accurate image placeholder as a compact string (in 20-30 characters). Check out the official Blurhash docs for more info.
FAQs
React image component with built-in Blurhash placeholders for better UX and Core Web Vitals.
We found that visionary-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.