
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@rsbuild-image/react
Advanced tools
> 🚧 The plugin is under active development, and the API is not stable. Please create an issue if you meet any trouble.
🚧 The plugin is under active development, and the API is not stable. Please create an issue if you meet any trouble.
The image plugin for Rsbuild applications, which provide an <Image /> component to render images with series features for better performance and developer experience.
Built-in Best Practices 🎯
Compile-time Optimization ⚡️
Image Hosting Integration 🖼️
Responsive Image Loading 📱
Install the dependencies:
$ pnpm add -D sharp ipx
$ pnpm add @rsbuild-image/react
The sharp binary is required to be installed on your system, you can install the experimental WebAssembly variant of sharp if you have any trouble while installing binary, please refer to the sharp installation guide for more details.
The ipx package is optional, it provides the image processing capabilities for the development server. You probably no need to install it if you don't want to use the development server or you already have a custom image processing middleware.
Setup the plugin to your Rsbuild configuration file, set ipx to {} to enable the optional ipx image processing middleware if you already have it installed. Or you must implement your own image loader.
rsbuild.config.ts
import { defineConfig } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';
import { pluginImage } from '@rsbuild-image/react';
export default defineConfig({
plugins: [pluginReact(), pluginImage({ ipx: {} })]
});
Or if you are using Modern.js, you can setup the plugin in the modern.config.ts file.
modern.config.ts
import { appTools, defineConfig } from '@modern-js/app-tools';
import { pluginImage } from '@rsbuild-image/react';
export default defineConfig({
plugins: [appTools({ bundler: 'rspack' })],
builderPlugins: [pluginImage({ ipx: {} })]
});
Then configure the tsconfig.json file to handle all image assets suffixed with ?image.
tsconfig.json
{
"compilerOptions": {
"types": ["@rsbuild-image/react/types"]
}
}
So that you can use the <Image /> component in your React application:
import { Image } from '@rsbuild-image/react/runtime';
import imgMountains from './mountains.jpg?image';
// ^? { url: string; width: number; height: number; thumbnail: ...
export default function App() {
return (
<Image src={imgMountains} width={300} placeholder="blur" alt="example" />
// Will actually request to: /_rsbuild/ipx/f_auto,w_300,q_75/static/assets/mountains.085a2b79.jpg
// <Image /> will infer the height according to the width and keep the aspect ratio,
// So that it won't take any cumulative layout shift.
// And a blurred thumbnail will be used as placeholder before the image is loaded.
);
}
WIP
FAQs
> 🚧 The plugin is under active development, and the API is not stable. Please create an issue if you meet any trouble.
The npm package @rsbuild-image/react receives a total of 589 weekly downloads. As such, @rsbuild-image/react popularity was classified as not popular.
We found that @rsbuild-image/react demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.