Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

NOT MAINTAINED ANYMORE - img element wrapper component for React that understands EXIF orientation information and corrects it using CSS transforms.

License

Notifications You must be signed in to change notification settings

rricard/react-exif-orientation-img

Repository files navigation

NOT MAINTAINED ANYMORE Please reach out in an issue if you wish to maintain this.

react-exif-orientation-img

img element wrapper component for React that understands EXIF orientation information and corrects it using CSS transforms.

Example

Installation

npm install --save react-exif-orientation-img
# or
yarn add react-exif-orientation-img

Usage

Instead of using an img element, use this component instead:

import React from 'react';
import ExifOrientationImg from 'react-exif-orientation-img'

const MyComponent = () =>
  <ExifOrientationImg
    src="https://github.com/recurser/exif-orientation-examples/blob/master/Portrait_8.jpg?raw=true"
    alt="A waterfall"
  />

All properties will be cleanly passed to the img element including style and onLoad that this component uses under the hood. However, keep in mind that you should be aware that width/height and other dimension manipulations may not work as expected.

Development

yarn is preferred to work with this project.

Dev server

Just start a server with yarn start.

About

NOT MAINTAINED ANYMORE - img element wrapper component for React that understands EXIF orientation information and corrects it using CSS transforms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published