
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
@unitools/image
Advanced tools
This is the official documentation of the @unitools/image
package.
npm install @unitools/image
npm install -D @unitools/babel-plugin-image
or
yarn add @unitools/image
yarn add -D @unitools/babel-plugin-image
Add module resolver to your next.config.js
file.
// next.config.js
module.exports = {
webpack(config) {
config.resolve.alias["@unitools/image"] = "next/image";
return config;
},
};
npm install @unitools/image expo-image
npm install -D @unitools/babel-plugin-image
or
yarn add @unitools/image expo-image
yarn add -D @unitools/babel-plugin-image
Add babel plugin to your babel.config.js
file.
// babel.config.js
module.exports = {
plugins: [
[
"@unitools/babel-plugin-image",
{
assets: "src/assets", // Path to your assets folder where images are stored
},
],
],
};
import Image from "@unitools/image";
export default function Home() {
return (
<View>
<Image src="/logo.png" alt="Logo" width={200} height={200} />
</View>
);
}
Prop | Type | Default | Description | Status | Support Status |
---|---|---|---|---|---|
src | string | NextImage Type | Image source | required | ✅ | |
alt | string | Image alt text | required | ✅ | |
width | number | Image width | required | ✅ | |
height | number | Image height | required | ✅ | |
loader | string | Image loader | - | ❌ | |
fill | string | Image fill | - | ❌ | |
sizes | string | Image sizes | - | ❌ | |
quality | number (integer 1-100) | Image quality | - | ❌ | |
priority | boolean | Image priority | - | ✅ | |
placeholder | string | Image placeholder | - | ✅ | |
style | object | Image style | - | ✅ | |
onError | function | Error function | - | ✅ | |
onLoad | function | Load function | - | ✅ | |
onLoadingComplete | function | Callback function | - | ❌ | |
loading | string | Image loading | - | ❌ | |
blurDataURL | string | Image blur data | - | ❌ |
FAQs
This is the official documentation of the `@unitools/image` package.
The npm package @unitools/image receives a total of 0 weekly downloads. As such, @unitools/image popularity was classified as not popular.
We found that @unitools/image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.