# express-thumbnail

> Express framework middleware for creation of thumbnails on the fly

Latest version **0.2.4** (published 2017-11-17) · MIT license · 0 weekly downloads

## Install

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

## 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.2.4 |
| Published | 2017-11-17 |
| First published | 2014-10-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Vaidas Keblys |
| Maintainers | vaidas |
| Keywords | thumb, thumbnail, image, middleware |

## Links

- npm: https://www.npmjs.com/package/express-thumbnail
- Repository: https://github.com/Vaidas737/express-thumbnail
- Homepage: https://github.com/Vaidas737/express-thumbnail#readme
- Issues: https://github.com/Vaidas737/express-thumbnail/issues
- npm.io page: https://npm.io/package/express-thumbnail

## Dependencies (3)

- [lwip](https://npm.io/package/lwip.md) 0.0.9
- [mkdirp](https://npm.io/package/mkdirp.md) ~0.5.*
- [node-gyp](https://npm.io/package/node-gyp.md) ~3.6.2

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.2.4 (latest) — 2017-11-17
- 0.2.3 — 2017-11-14
- 0.2.2 — 2017-09-04
- 0.2.1 — 2015-10-18
- 0.2.0 — 2015-10-17
- 0.1.2 — 2014-10-04
- 0.1.1 — 2014-10-04
- 0.1.0 — 2014-10-04

## README

# Express Thumbnail

Express thumbnail is a [Express framework](http://expressjs.com/) middleware for creation of thumbnails on the fly. 
It automatically creates a thumbnails by adding query parameters onto a image url.

## Overview

This module use [lwip](https://github.com/EyalAr/lwip), which didn't require external runtime dependencies for image 
processing. It means you don't have to install anything else on your system.


## Install
  
    $ npm install express-thumbnail

## Examples

```js
var express = require('express');
var expressThumbnail = require('express-thumbnail');
var app = express();
...
app.use(expressThumbnail.register(__dirname + '/images'));
```

```html
<img src="foo.png?thumb=50x50">
```

## Docs.

### expressThumbnail.register(rootDir, [options])

`rootDir` path to images root directory.

`options` (optional) an object of options. Available options:

* `cacheDir` The location where converted images will be stored. Default is `[rootDir]/.thumb`.

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