Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Image Mime Type Sniffer

Image Mime Type Sniffer Laravel Package

rosell-dk/image-mime-type-sniffer

A small PHP library that detects an image's MIME type by inspecting its actual file contents rather than trusting the extension. Useful when validating uploads, since it relies on magic bytes and is easy to drop into existing projects.

Deep Wiki
Context7

rosell-dk/image-mime-type-sniffer is a tiny PHP library that determines an image's MIME type by inspecting the file's leading bytes instead of trusting its extension. It is handy for validating uploads, where a renamed .jpg could otherwise slip through, and it works without relying on fileinfo or getimagesize.

  • Sniffs magic bytes to recognise common image formats
  • Returns null for unrecognised content, making failure easy to handle
  • No external dependencies or special PHP extensions
  • Simple static API: ImageMimeTypeSniffer::sniff($path)
  • Lightweight and framework-agnostic
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums