# gulp-rewrite-image-path

> Convert and replace src attrs within your data. Based on catindev/gulp-inline-image-path.

Latest version **0.0.4** (published 2016-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-rewrite-image-path
pnpm add gulp-rewrite-image-path
yarn add gulp-rewrite-image-path
bun add gulp-rewrite-image-path
```

## 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.0.4 |
| Published | 2016-08-25 |
| First published | 2016-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | lagartoflojo |
| Maintainers | lagartoflojo |
| Keywords | gulpplugin, image, html, src, url, path, DOM |

## Links

- npm: https://www.npmjs.com/package/gulp-rewrite-image-path
- Repository: https://github.com/lagartoflojo/gulp-rewrite-image-path
- Issues: https://github.com/lagartoflojo/gulp-rewrite-image-path/issues
- npm.io page: https://npm.io/package/gulp-rewrite-image-path

## Dependencies (3)

- [cheerio](https://npm.io/package/cheerio.md) ~0.13.1
- [through2](https://npm.io/package/through2.md) ~0.4.1
- [gulp-util](https://npm.io/package/gulp-util.md) ~2.2.14

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.0.4 (latest) — 2016-08-25
- 0.0.3 — 2016-08-25
- 0.0.2 — 2016-08-25
- 0.0.1 — 2016-08-25

## README

Convert and replace the `src` of the images in your HTML files.

## Example

##### gulpfile.js

```js
var gulp = require('gulp');
var rewriteImagePath = require('gulp-rewrite-image-path');

gulp.task('default', function () {
  gulp.src('index.html')
    ...
    .pipe(rewriteImagePath({path:"build/images"}))
    ...
});
```


##### Before:

```html
<html>
  <head>
  </head>
  <body>
    <img src="sample1.png" />
    <img src="subdirectory/sample2.png" />
    <img src="https://www.wikipedia.org/static/favicon/wikipedia.ico" />
...
```


##### After:

```html
<html>
  <head>
  </head>
  <body>
    <img src="build/images/sample.png">
    <img src="build/images/subdirectory/sample2.png" />
    <img src="https://www.wikipedia.org/static/favicon/wikipedia.ico" />
...
```


### License

MIT © lagartoflojo

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