# gulp-webp-css

> replace background image to webp if supports

Latest version **1.1.0** (published 2016-04-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install gulp-webp-css
pnpm add gulp-webp-css
yarn add gulp-webp-css
bun add gulp-webp-css
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-04-02 |
| First published | 2016-03-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | seokirill |
| Maintainers | seokirill |

## Links

- npm: https://www.npmjs.com/package/gulp-webp-css
- Repository: https://github.com/seokirill/gulp-webp-css
- Homepage: https://github.com/seokirill/gulp-webp-css#readme
- Issues: https://github.com/seokirill/gulp-webp-css/issues
- npm.io page: https://npm.io/package/gulp-webp-css

## Dependencies (3)

- [css](https://npm.io/package/css.md) ^2.2.1
- [through2](https://npm.io/package/through2.md) ^2.0.1
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.7

## Recent versions

- 1.1.0 (latest) — 2016-04-02
- 1.0.3 — 2016-03-25
- 1.0.2 — 2016-03-25
- 1.0.1 — 2016-03-25
- 1.0.0 — 2016-03-25

## README

# gulp-webp-css

## Example
```css
// Input
.banner{
    background: url(/img/bannerbg.jpg) no-repeat center;
}

// Output
.banner{
    background: url(/img/bannerbg.jpg) no-repeat center;
}
@supports (-webkit-appearance:none){
    .banner {
        background-image: url(/img/bannerbg.webp);
    }
}
```
## Install
```bash
npm i --save-dev gulp-webp-css
```
## Usage
```javascript
var webpCss = require('gulp-webp-css');

gulp.task('css', function () {
    gulp.src('./assets/css/*.css')
        .pipe(webpCss()) // or .pipe(webpCss(['.jpg','.jpeg']))
        .pipe(gulp.dest('./public/css/'))
});
```

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