# reset-image-orientation

> Reset uploaded image orientation based on EXIF

Latest version **2.1.2** (published 2023-01-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install reset-image-orientation
pnpm add reset-image-orientation
yarn add reset-image-orientation
bun add reset-image-orientation
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2023-01-22 |
| First published | 2019-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Oleg Petrov |
| Maintainers | fyvfyv |
| Keywords | img, exif, reset, base64, orientation, browser |

## Links

- npm: https://www.npmjs.com/package/reset-image-orientation
- Repository: https://github.com/fyvfyv/reset-image-orientation
- Homepage: https://github.com/fyvfyv/reset-image-orientation#readme
- Issues: https://github.com/fyvfyv/reset-image-orientation/issues
- npm.io page: https://npm.io/package/reset-image-orientation

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 2.1.2 (latest) — 2023-01-22
- 2.1.1 — 2023-01-22
- 2.1.0 — 2023-01-16
- 2.0.1 — 2019-06-22
- 2.0.0 — 2019-04-09
- 1.0.0 — 2019-01-12

## README

# reset-image-orientation
Reset uploaded image orientation based on EXIF

## Installation

```sh
npm install reset-image-orientation
```

## Javascript example

```javascript
var resetOrientation = require('reset-image-orientation');

var input = document.querySelector('input[type="file"]');
var img = document.querySelector('img');

input.addEventListener('change', function(e) {
    e.preventDefault();

    var file = e.target.files[0];

    resetOrientation.default()(file, function(base64) => {
        img.src = base64;
    });
});
```

## Typescript example

```typescript
import resetOrientation from 'reset-image-orintation';

const input = document.querySelector('input[type="file"]');
const img = document.querySelector('img');

input.addEventListener('change', function(e: Event) {
    e.preventDefault();

    var file = e.target.files[0];

    resetOrientation(file, function(base64: string) => {
        img.src = base64;
    });
});
```

## License

[MIT](LICENSE)

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