本文目前仅提供英文版本。

Privacy2025年11月27日7 min read

Local Image Conversion on Air-Gapped or Restricted Networks

Some teams cannot upload images to cloud conversion services. The reason may be client contracts, unreleased products, regulated data, internal policy, or a network that blocks unknown external services. In those environments, image optimization still matters, but the workflow has to stay local and predictable.

Local image conversion is not only a privacy preference. It can be an operational requirement. The team needs to know where image bytes go, which tools run, how licenses are activated, and how outputs are reviewed before publication.

"Use an offline converter" is not a complete answer for restricted networks. The workflow has to separate image bytes from license traffic, package downloads, update checks, logs, artifacts, and human review tools.

Define the Restriction First#

"Restricted network" can mean different things:

  • no internet access at all
  • internet access through an allowlist
  • no upload of client files
  • no third-party SaaS tools
  • no telemetry or crash reporting
  • no installation without security review

Before choosing a workflow, identify the actual restriction. A fully air-gapped machine has different needs from a corporate laptop that can download approved tools but cannot upload client assets.

Write the restriction as a policy table:

RestrictionWorkflow implication
No internet at allInstaller, license state, docs, and source files must be staged before entry
Allowlisted internetPackage, license, and documentation hosts need explicit approval
No client-file uploadConversion can run locally, but external viewers and validators may still be prohibited
No telemetryTool documentation must explain analytics, crash reporting, and conversion reporting
No unreviewed binariesInstallation source, version, and checksum policy need approval
No outbound production trafficDo not run conversion as a hidden deploy-time network dependency

This table prevents a common mistake: treating "no image uploads" as if it were the same as "no network traffic of any kind."

Keep Image Bytes Local#

The core requirement is simple: image bytes should be processed on the machine or approved internal environment. A local converter should not send source images to a remote API for compression.

For GetWebP products, the design goal is local image processing. Image bytes are not uploaded for conversion. License-related network traffic is separate from image processing and should be evaluated according to the team’s policy.

That distinction matters. A tool can be acceptable for image privacy while still needing an approved activation path.

The GetWebP security whitepaper documents this as a data-plane versus control-plane boundary:

PlaneExamplesRestricted-network question
Image-processing data planeInput bytes, decoded pixels, output files, image metadata handled during conversionDo these bytes leave the approved machine or infrastructure?
Control planeLicense activation, status checks, account operations, website trafficIs this traffic allowed, blocked, pre-staged, or unnecessary for this run?

Use that language in approvals. "No image upload to GetWebP" is a narrower and more defensible claim than "the workflow is zero network."

Preserve Originals in Controlled Storage#

Restricted environments often care about audit and rollback. Keep originals in a controlled folder:

restricted-project/
  originals/
  optimized/
  reports/

The original folder should remain untouched. Generated files should go to a separate output folder. Reports should record command settings, dates, failures, and review status.

This structure makes it easier to prove that source assets were not overwritten or moved into an unapproved location.

Add a manifest before conversion:

file	path	size_bytes	sha256	role	approved_to_process
1	originals/hero.jpg	842113	...	LCP hero	yes
2	originals/product-zoom.png	1452210	...	Product zoom	yes
3	originals/client-scan.jpg	612884	...	Sensitive scan	yes

The manifest is not just bookkeeping. It proves the input set, helps reviewers detect accidental additions, and gives the team a rollback map.

Use Dry Runs and Structured Reports#

Before converting a large folder, run a dry run if the tool supports it. Then run conversion with structured output when the environment requires audit evidence.

getwebp ./originals --dry-run
getwebp ./originals \
  -o ./optimized \
  --recursive \
  --format webp \
  --quality 82 \
  --json > reports/conversion.ndjson

The report helps reviewers see what happened without depending on informal terminal history.

In a truly air-gapped environment, avoid examples that fetch packages at runtime. npx -y getwebp is convenient on a connected development machine, but it requires package download unless the package is already available locally. For restricted work, use an approved installed binary, an internal package mirror, or a pre-staged tool bundle.

The GetWebP CLI command reference documents --dry-run, --output, --recursive, --format, --quality, and --json. The JSON output reference documents NDJSON output: each line is a JSON object, the first line is a version event, and conversion results appear as convert.completed, convert.truncated, or convert.failed.

For audit, parse the report into a local summary:

jq -r 'select(.type == "convert.completed") | .data.results[] | [.status, .file, (.outputPath // ""), (.savedRatio // ""), (.error // "")] | @tsv' reports/conversion.ndjson > reports/conversion-summary.tsv

Keep the raw NDJSON and the human-readable summary.

Plan License and Update Workflows#

Restricted environments should decide how tools are installed, activated, and updated before the first production batch. Questions to answer:

  • is the CLI already approved for installation?
  • does activation require internet access?
  • can activation happen before entering the restricted environment?
  • who is allowed to update the tool?
  • how are tool versions recorded in reports?

Do not wait until a release deadline to discover that a network policy blocks activation or package installation.

Use a preflight checklist:

ItemEvidence to keep
Approved installer or binaryVersion, source, checksum or internal package reference
License stateActivation date, allowed machine, offline behavior, renewal owner
Documentation snapshotLocal copy or approved internal link
Package mirrorInternal registry URL and change-control owner
Update windowWho can update the tool and how rollback works
Network exceptionExact host, purpose, and expiry if allowlisted

The GetWebP security documentation says day-to-day CLI conversion works offline after activation, but activation, status, logout, and heartbeat belong to the license control plane. Plan that before the machine enters a locked-down state.

Test the Workflow Offline#

If the final environment has limited connectivity, test under similar conditions before the real batch. Disconnect from the network or use the same firewall policy, then run a small conversion and confirm what succeeds.

This test should include activation status, input reading, output writing, report generation, and error handling. It is better to find a missing permission or blocked path during a five-file trial than during a full client migration.

The pilot should include both success and failure:

TestExpected result
Convert five approved imagesOutputs written under optimized/
Dry run a nested folderNo writes, expected file list
Attempt missing input pathClear command-level failure
Include one corrupt filePer-file error without losing successful outputs
Write to a read-only folderPermission problem is visible
Run after disconnecting networkConversion still works if licensing and installation were pre-staged

Pair that with the current exit-code model in the LLM context document. Exit 0 means success, 2 means a usage error, 3 means partial failure, 4 points to auth/license state, 5 points to network failure, and 6 means Free-plan truncation. In restricted environments, those categories matter more than a generic "build failed."

Review Quality Without Cloud Tools#

Local conversion does not remove the need for visual review. The team still needs to compare sources and outputs, especially for:

  • screenshots with text
  • product images
  • identity documents or sensitive scans
  • diagrams
  • transparent assets
  • low-light photos

Keep review local too. Avoid uploading outputs to external viewers or validators if the same restrictions apply.

Use local review states:

StateMeaning
ApprovedOutput can move to the publishing package
RetryRe-run with a different quality setting, dimension, or format
Keep originalConversion was smaller but not visually acceptable
Replace sourceOriginal is already damaged or unsuitable
EscalateSensitive file needs project owner approval before publication

For sensitive assets, do not treat smaller output as success until the designated reviewer signs off. A local tool can still produce a bad or misleading image.

Use Standards References for Technical Decisions#

Google's WebP documentation explains the image format used by many local conversion workflows. MDN's WebAssembly documentation explains the browser technology behind many local-first web tools.

Those references help with technical review, but approval should still follow the organization’s security and data-handling policy.

Also document which GetWebP surface is being used:

SurfaceRestricted-network note
Web converter / PWABrowser-local conversion, but site assets and account flows are still normal web traffic
CLILocal disk-to-disk conversion; license control plane must be handled separately
MCP serverLocal stdio tool for agents; same licensing boundary as CLI
WordPress pluginConversion runs inside the customer's WordPress/PHP infrastructure, not on GetWebP servers
Chrome extensionMay fetch the source image from the original site the user acts on; not a GetWebP conversion upload

That surface-level distinction keeps the article from overpromising. "Local" means different things in a browser, CLI, MCP host, extension, and WordPress server.

Document the Local Workflow#

Write a short operating note:

Images are copied into originals/.
Conversion runs locally with the approved CLI version and pre-approved license state.
Outputs go to optimized/.
No source images are uploaded for conversion.
Reports are stored under reports/.
Visual review is required before publishing.
Runtime package downloads are not allowed during the production conversion run.

In restricted environments, clarity is part of safety. A local conversion workflow should be boring, documented, and easy to repeat without relying on unapproved services.

Jack avatar

Jack

GetWebP Editor

Jack writes GetWebP guides about local-first image conversion, WebP workflows, browser compatibility, and practical performance checks for teams that publish images on the web.