Two pipelines: static vs upload
Theme images in public/images should be WebP before deploy. User uploads should be transcoded in a job (Intervention/Imagick) or via an HTTP API so the web process does not block.
Why it matters
- S3 bills and local disks fill with originals.
- Glide/Intervention on huge files exhausts PHP memory.
- Marketing landing pages still need LCP care.
How to do it
- Bulk convert
public/imagesin the browser. - For uploads, resize to max 2000 px then encode WebP quality 80.
- Keep the original only if you have a legal reason.
Settings that work
2000 px / 80% for user photos. 1920 / 75% for heroes.
API option
If you do not want Imagick on the server, POST the file to the WebP API from a queued job and store the response.