Skip to content

Commit

Permalink
docs(readme): add note about disk cache
Browse files Browse the repository at this point in the history
Related to #20
  • Loading branch information
saneef committed Oct 30, 2022
1 parent 18a897e commit 1902ae0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Requires Node 12+
- Drop-in plugin to replace all `<img>` in your website without shortcodes.
- [Ignore image using data attribute](#ignore-images).
- Download, cache, and optimize [remote images](#remote-images).
- Skip processing unchanged and already existing images in the output directory. See [disk cache](#disk-cache).

## Supported Image Formats

Expand Down Expand Up @@ -136,6 +137,10 @@ You can provide class attribute for the enclosing `<picture>` using `data-img2pi
/>
```

### Disk Cache

Disk cache is a feature provided by the [`eleventy-img` plugin](https://www.11ty.dev/docs/plugins/image/). This plugin will skip unchanged, and already existing images in the output path. If you don't delete generated image between builds, you'll get faster builds. [This sample project](https://github.com/11ty/demo-eleventy-img-netlify-cache) shows how to persist disk cache across Netlify builds.

### Example

```html
Expand Down

0 comments on commit 1902ae0

Please sign in to comment.