Socket
Book a DemoInstallSign in
Socket

to-webp-json

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-webp-json

Image conversion for static websites

latest
Source
npmnpm
Version
0.3.4
Version published
Maintainers
1
Created
Source

to-webp-json

NPM Version GitHub Created At Open in StackBlitz

to-webp-json

A CLI tool that converts images to the desired format (webp, jpg, png, etc.), generates a structured JSON map of the output files, and optionally resizes them by width and/or height. Useful for static sites, galleries, and automation.

Usage

Create an img-src folder

mkdir img-src

Place images inside img-src

npx to-webp-json@latest

Command-line options

OptionTypeDescriptionDefault
srcstringSource folder nameimg-src
diststringResult folder nameimg-dist
formatstringOutput format: webp, jpg, png, avif, tiff, gif or originalwebp
jsonstring | nullOutput JSON filename (or null to skip)null
widthnumber | nullMaximum image width in pixelsnull
heightnumber | nullMaximum image height in pixelsnull

Examples

npx to-webp-json json=static-images format=original
npx to-webp-json src=sources height=2000

Run with no arguments (interactive mode)

npx to-webp-json

Keywords

typescript

FAQs

Package last updated on 28 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.