# eyeglass-image-dimensions

> An eyeglass module that provides libsass the same image dimensions functionality found in ruby compass.

Latest version **0.2.2** (published 2017-03-15) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install eyeglass-image-dimensions
pnpm add eyeglass-image-dimensions
yarn add eyeglass-image-dimensions
bun add eyeglass-image-dimensions
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2017-03-15 |
| First published | 2015-09-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jack Westbrook |
| Maintainers | jwestbrook |
| Keywords | sass, eyeglass-module, image dimensions, image size |

## Links

- npm: https://www.npmjs.com/package/eyeglass-image-dimensions
- Repository: https://github.com/jackw/eyeglass-image-dimensions
- Homepage: https://github.com/jackw/eyeglass-image-dimensions#readme
- Issues: https://github.com/jackw/eyeglass-image-dimensions/issues
- npm.io page: https://npm.io/package/eyeglass-image-dimensions

## Dependencies (3)

- [promise](https://npm.io/package/promise.md) ^7.1.0
- [image-size](https://npm.io/package/image-size.md) ^0.5.0
- [node-sass-utils](https://npm.io/package/node-sass-utils.md) ^1.1.0

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.2.2 (latest) — 2017-03-15
- 0.2.0 — 2016-02-21
- 0.1.1 — 2015-09-20
- 0.1.0 — 2015-09-20

## README

[![Build Status](https://travis-ci.org/jackw/eyeglass-image-dimensions.svg?branch=master)](https://travis-ci.org/jackw/eyeglass-image-dimensions)
[![NPM Downloads](https://img.shields.io/npm/dm/eyeglass-image-dimensions.svg)](http://npm-stat.com/charts.html?package=eyeglass-image-dimensions&author=&from=&to=)
[![devDependency Status](https://david-dm.org/jackw/eyeglass-image-dimensions/dev-status.svg)](https://david-dm.org/jackw/eyeglass-image-dimensions#info=devDependencies)
# eyeglass-image-dimensions
An eyeglass module to give LibSass the same image dimension functionality found in ruby compass.

## Setup

To use image dimensions first install eyeglass then eyeglass-image-dimensions:


	npm install eyeglass --save-dev
	npm install eyeglass-image-dimensions --save-dev


Then add the following to your sass file/s:

```
@import 'image-dimensions';
```

## Usage

### image-width
returns the width of the image in pixels.

```
width: image-width($image);
```

### image-height
returns the height of the image in pixels.

```
height: image-height($image);
```


### image-dimensions
returns a space separated list consisting of the width and height of an image in pixels.

```
background-size: image-dimensions($image);
```

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