Skip to content
Corex

WebpConverter

Corex\Media\WebpConverter · class · Add-ons layer

Converts an image to WebP per a {@see ConversionPlan} (spec 048) using GD (preferred) or Imagick. Fail-safe boundary: a corrupt/unreadable/oversized image returns false and leaves the original untouched — never a fatal. The original is always preserved (the WebP is a sibling file).

Output quality (1-100). Defaults to the Media settings default; injected from settings at boot.

convert(ConversionPlan $plan, string $mime): bool

Section titled “convert(ConversionPlan $plan, string $mime): bool”