# express-image

> Image serve middleware for Express

Latest version **0.0.2** (published 2014-12-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install express-image
pnpm add express-image
yarn add express-image
bun add express-image
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-12-19 |
| First published | 2014-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | mehwww |
| Maintainers | mehwww |

## Links

- npm: https://www.npmjs.com/package/express-image
- Repository: https://github.com/mehwww/express-image
- Issues: https://github.com/mehwww/express-image/issues
- npm.io page: https://npm.io/package/express-image

## Dependencies (4)

- [gm](https://npm.io/package/gm.md) ^1.17.0
- [mime](https://npm.io/package/mime.md) ^1.2.11
- [parseurl](https://npm.io/package/parseurl.md) ^1.3.0
- [utils-merge](https://npm.io/package/utils-merge.md) ^1.0.0

## Recent versions

- 0.0.2 (latest) — 2014-12-19
- 0.0.1 — 2014-12-19
- 0.0.0 — 2014-12-19

## README

# express-image

A express middleware help you resize your images

## Install
```sh
npm i express-image
```

## Example

```js
var express = require('express');
var image = require('express-image');
var app = express();

app.use('/imgs',image(__dirname));

app.listen(3000);
```

Now you can request localhost to get a resized image

`http://localhost:3000/imgs/sample.jpg?w=40`  resize an image to a width of 40px while maintaining aspect ratio

`http://localhost:3000/imgs/sample.jpg?h=40`  resize an image to a height of 40px while maintaining aspect ratio

`http://localhost:3000/imgs/sample.jpg?w=40&h=40`  resize an image to a fit a 40x40 rectangle while maintaining aspect ratio

`http://localhost:3000/imgs/sample.jpg?w=40&h=40&f=1`  override the image's proportions and force a resize to 40x40

---
_Source: https://npm.io/package/express-image · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
