Create img-src
folder
mkdir img-src
Add images to img-src
npx to-webp-json
Param | Type | Description | Default |
---|---|---|---|
src | string | Source folder name | img-src |
dist | string | Result folder name | img-dist |
format | string | webp, jpg, png or original | webp |
json | string | null | Structure file name | null |
width | number | null | Maximum image width in pixels | null |
height | number | null | Maximum image height in pixels | null |
npx to-webp-json json=static-images format=original
npx to-webp-json src=sources height=2000