Skip to content

$ cat your-image-uploads-need-a-content-type-header.md

Your image uploads need a `Content-Type` header

Explains why S3 image uploads should set an explicit Content-Type header instead of relying on inference, since a wrong type can cache a broken response at the edge. Shows how to map validated image extensions to MIME types in Laravel, including Livewire and Nova uploads.

dyrynda.com.au01 Sept 2026 · 1 min read · summary
Read on dyrynda.com.au ↗
S3 can infer an uploaded image's content type, but getting it wrong can leave a broken response cached at the edge. Here is how I explicitly map validated image extensions to MIME types in Laravel, including Livewire and Nova uploads.

source

This is a summary of an article first published by dyrynda.com.au. The full piece is on their site.

Open original