MediaSettings
Corex\Media\MediaSettings · class · Add-ons layer
The Corex Media WebP settings (spec 061): whether conversion is on, the output quality, and the per-format toggles — read from Config dot-keys (settings UI / .env), each overridable by a filter. A pure value object so it is unit-tested; fromConfig() is the only boundary. Originals are always preserved (never a setting) — the WebP is a sibling file. media.webp.enabled (bool, default true) filter: corex_media_webp_enabled media.webp.quality (1-100, default 82) filter: corex_media_webp_quality media.webp.convert_jpeg (bool, default true) filter: corex_media_convert_jpeg media.webp.convert_png (bool, default true) filter: corex_media_convert_png
Public API
Section titled “Public API”__construct(bool $enabled, int $quality, bool $convertJpeg, bool $convertPng, float $minSaving)
Section titled “__construct(bool $enabled, int $quality, bool $convertJpeg, bool $convertPng, float $minSaving)”defaults(): self
Section titled “defaults(): self”fromConfig(ConfigInterface $config): self
Section titled “fromConfig(ConfigInterface $config): self”convertibleMimes(): array
Section titled “convertibleMimes(): array”The MIME types that should be converted given the per-format toggles, filterable as a whole.