@daiiz/dpi-aware-image

2.0.7 • Public • Published

dpi-aware-image

An img element which determine own physical width and height by considering source png image's DPI.

Installation

$ npm install @daiiz/dpi-aware-image

Development

$ npm install
$ npm run build
$ npm run demo

Open http://localhost:9001/demo/index.html

Usage

<style>
  /* Optional */
  dpi-aware-image {
    display: inline-block;
    --max-width: 100%;
    --max-height: 300px;
  }
</style>

<dpi-aware-image src='/demo/dist/icon.png'></dpi-aware-image>

Demos

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.70latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.70
2.0.60
2.0.50

Package Sidebar

Install

npm i @daiiz/dpi-aware-image

Weekly Downloads

0

Version

2.0.7

License

MIT

Unpacked Size

4.66 kB

Total Files

3

Last publish

Collaborators

  • daiiz