An open API service indexing awesome lists of open source software.

https://github.com/adamisntdead/gulp-inline-imagesize

A Gulp Task To Add Image Size Comments To Your HTML
https://github.com/adamisntdead/gulp-inline-imagesize

gulp gulp-plugin gulp-tasks image-processing

Last synced: 24 days ago
JSON representation

A Gulp Task To Add Image Size Comments To Your HTML

Awesome Lists containing this project

README

          

# gulp-inline-imagesize
> Make comments in your HTML with the size of your images

[![npm](https://img.shields.io/npm/v/gulp-inline-imagesize.svg)](https://www.npmjs.com/package/gulp-inline-imagesize)
[![Build Status](https://travis-ci.org/adamisntdead/gulp-inline-imagesize.svg?branch=dev)](https://travis-ci.org/adamisntdead/gulp-inline-imagesize)

## Install

```
$ npm install --save-dev gulp-inline-imagesize
```

## Usage

```js
const gulp = require('gulp');
const inlineImagesize = require('gulp-inline-imagesize');

gulp.task('default', () =>
gulp.src('src/*.html')
.pipe(inlineImagesize())
.pipe(gulp.dest('dist'))
);
```

## Output

An example output is given an image `tree.jpg` thats `1500x500`,
and the HTML:

```html
picture of a tree
```

The output of running this task would be:

```html

picture of a tree
```

## License

MIT © [Adam Kelly](https://adamisntdead.com)