WebpGate
Corex\Media\WebpGate · class · Add-ons layer
The WebP activation gate (spec 062): decides whether a generated WebP derivative may be served, so a WebP is never delivered just because it exists. Pure — given pre-measured facts about the original and the derivative it returns active_for_delivery + an inactive_reason + the size saving. The WP boundary ({@see WebpMeta::measure()}) supplies the facts (filesize/getimagesize); this class is the judgement. Gate (all must hold to activate): the derivative is present + valid, its dimensions match the original, and it is smaller than the original by at least the configured threshold (default 5%).