rosell-dk/image-mime-type-guesser
A lightweight PHP library for detecting the MIME type of image files using multiple strategies, including finfo, exif_imagetype, getimagesize and magic byte sniffing. It falls back gracefully between methods, making it reliable for validating uploads and identifying images even when some PHP extensi...
ImageMimeTypeDetector, with an interface and DTO result. Use it inside form requests, upload services, or queued media-processing jobs rather than in views or models.finfo/Symfony Mime and existing validation, then adopt only for low-risk classification paths before expanding.fileinfo and whether file paths, streams, or raw bytes are accepted. Ensure error handling maps cleanly to Laravel validation messages and job retries.detected, uncertain, and failed states.How can I help you explore Laravel packages today?