A vue plugin that can help you display image in correct orientation.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src fix issue of wrongly usage of getBoundlingClientRect Jan 21, 2019
static
.babelrc
.editorconfig add directive; Jan 17, 2019
.gitignore
LICENSE Initial commit Jan 17, 2019
README-zh_CN.md Update README-zh_CN.md Jan 18, 2019
README.md
index.html add debug and npm settings. Jan 18, 2019
package-lock.json
package.json
webpack.config.js add debug and npm settings. Jan 18, 2019

README.md

Vue Img Orientation Changer

English | 简体中文

NPM Version NPM Downloads

A vue directive that fixes your jpeg jpg tiff files orientation.

TIPS: This can really help you stay away from neck damages.

image

Installation

Via NPM
npm install vue-img-orientation-changer -S
Import
import Vue from 'vue'
import VueImgOrientationChanger from 'vue-img-orientation-changer'

Vue.use(VueImgOrientationChanger)
Usage
add v-img-orientation-changer on your img element.
<img v-img-orientation-changer src="https://user-images.githubusercontent.com/10917606/51309472-735aa580-1a7f-11e9-8081-67ced9a3f536.jpeg">

TIPS: attribute [data-orientation] of the img element will be set with value of img's exif orientation.

// final DOM is like below
// means this img orientation is 6;
<img data-orientation="6" src="https://user-images.githubusercontent.com/10917606/51309472-735aa580-1a7f-11e9-8081-67ced9a3f536.jpeg">

LICENSE

MIT