0.2.0 • Published 7 years ago
img-exif v0.2.0
<img-exif>
This vanilla web component simply takes a
src
attribute like the standardimg
element and renders it in it's correct orientation using any embedded EXIF data.Note: This component only works for same-origin images or images with cross-origin headers!
img-exif
has no dependencies (but may require a polyfill).
Install
Install img-exif
with your preferred node package manager.
$ yarn add img-exif
or
$ npm install --save img-exif
You will need to include any polyfills for browsers that do not support the Web Components v1 spec. See https://github.com/webcomponents/webcomponentsjs.
Usage
Import the HTML file in the <head>
after installing.
<link rel="import" href="./node_modules/img-exif/img-exif.html">
Use the tag on your page.
<img-exif src="./your-image.jpg"></img-exif>
Options
Attribute | Type | Default | Description |
---|---|---|---|
src | url | Same as <img src=""> |
Limitations
- No option to use
height=
orwidth=
attributes. Use CSSwidth:
andheight:
properties instead.
History
For changelog, see releases.