Tutorial6 min read·Updated

Laravel: Store WebP Uploads and Blade Images

Laravel will store whatever you put in `storage/app/public`. Blade then serves it. Convert static theme images to WebP, and convert user uploads on the way in so you do not accumulate 10 MB PNGs.

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

  1. Bulk convert public/images in the browser.
  2. For uploads, resize to max 2000 px then encode WebP quality 80.
  3. 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.

Convert a batch in your browser. Nothing is uploaded.

Put it into practice

Convert your images to WebP right now, free and privately in your browser.

Open the converter

Frequently asked questions

No. Use this converter for static files or Intervention/API for uploads.

Yes. It is just a file URL.

Keep reading

Tutorial6 min read

WebP in Django

Django ImageField stores what you upload. Convert static assets to WebP and normalise uploads with Pillow or an API.

Read more
Tutorial6 min read

WebP in Rails

Active Storage can produce WebP variants. Pre-convert marketing assets and set variant formats so production stays light.

Read more