# @filecage/rollup-plugin-image-import-optimize

> This is a [rollup](https://github.com/rollup/rollup) plugin to support importing of images, similar to what [@rollup/plugin-image](https://github.com/rollup/plugins/tree/master/packages/image) does.

Latest version **0.1.0** (published 2022-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @filecage/rollup-plugin-image-import-optimize
pnpm add @filecage/rollup-plugin-image-import-optimize
yarn add @filecage/rollup-plugin-image-import-optimize
bun add @filecage/rollup-plugin-image-import-optimize
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2022-08-19 |
| First published | 2022-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | David Beuchert |
| Maintainers | filecage |

## Links

- npm: https://www.npmjs.com/package/@filecage/rollup-plugin-image-import-optimize
- Repository: https://github.com/filecage/rollup-plugin-image-optimize
- Homepage: https://github.com/filecage/rollup-plugin-image-optimize#readme
- Issues: https://github.com/filecage/rollup-plugin-image-optimize/issues
- npm.io page: https://npm.io/package/@filecage/rollup-plugin-image-import-optimize

## Dependencies (1)

- [sharp](https://npm.io/package/sharp.md) ^0.30.6

## Recent versions

- 0.1.0 (latest) — 2022-08-19

## README

# Rollup Plugin Image Import Optimize
This is a [rollup](https://github.com/rollup/rollup) plugin to support importing of images, similar to
what [@rollup/plugin-image](https://github.com/rollup/plugins/tree/master/packages/image) does.

However, this plugin does not import the image into your bundle. Instead, your image is emitted as asset and
your import is an object containing URLs to your image in different file formats:
```js
import picture from './picture.svg';

document.write(`<img src="${picture.webp}" />`);
document.write(`<img src="${picture.png}" />`);
```

Optimization of images can be configured. The plugin uses [sharp](https://github.com/lovell/sharp) internally
to process images.

---
_Source: https://npm.io/package/@filecage/rollup-plugin-image-import-optimize · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
