MediaConversionService
Corex\Media\Conversion\MediaConversionService · class · Add-ons layer
Converts the images already in the Media library to WebP from Settings (spec 119, US-SET-06). Shared hosts have no command line, so wp corex media regenerate-webp was out of reach. This starts the bounded job spec 068 registered for it, one run at a time; the open page advances it a step at a time through the jobs runner’s own action, and WP-Cron carries on when it is closed.
Public API
Section titled “Public API”__construct(JobService $jobs, MediaConversionRuns $runs, MediaRegenerationSource $source, ImageCapability $capability, MediaSettings $settings)
Section titled “__construct(JobService $jobs, MediaConversionRuns $runs, MediaRegenerationSource $source, ImageCapability $capability, MediaSettings $settings)”unavailableReason(): string
Section titled “unavailableReason(): string”Why the library cannot be converted now, or empty when it can.
start(int $actorId): array
Section titled “start(int $actorId): array”advance(): ?array
Section titled “advance(): ?array”One step of the running conversion, taken while the page is open; then where it is.