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

Mimey Laravel Package

xantios/mimey

xantios/mimey is a PHP MIME type helper for converting file extensions to MIME types and back. It offers a lightweight API for detection and validation, simplifying file upload and content-type handling in Laravel or plain PHP apps.

View on GitHub
Deep Wiki
Context7

PHP package for converting file extensions to MIME types and vice versa.

Frequently asked questions about Mimey
What is xantios/mimey used for in Laravel?
xantios/mimey is a lightweight lookup helper for converting file extensions to MIME types and MIME types to common extensions. In Laravel it is best used for non-authoritative conveniences such as filename-based Content-Type hints, preview or icon selection, import filters, or display metadata. It is not a validator, content sniffer, or security control for uploads.
How do I install xantios/mimey with Composer in Laravel?
Install it with Composer using composer require xantios/mimey, then check whether the package ships Laravel package discovery metadata for a service provider or facade. If discovery is absent or incompatible, register the provider manually or wrap the package behind your own resolver. Verify the installed version against your Laravel and PHP versions before adopting it.
Does xantios/mimey support Laravel facades and package discovery?
The package is described as offering an optional Laravel provider or facade, but the repository provenance is unknown and the last release was in 2021, so compatibility must be verified in your target stack. Prefer injecting an application-owned MimeTypeResolver interface instead of calling a facade directly. This keeps facade or provider collisions and future replacement risk low.
Which Laravel and PHP versions does xantios/mimey support?
Supported PHP and Laravel versions are not established by the provided context; the last release was 2021-06-12 and the repository is listed as unknown. The code surface is small, so it may still run on modern PHP and Laravel, but you should test installation, package discovery, and facade behavior on your exact versions. Do not assume support without a compatibility spike.
Is xantios/mimey safe for validating file uploads?
No. Extension-derived MIME types are spoofable and must not replace server-side content inspection, allowlists, image validation, or malware scanning. Use xantios/mimey only as a hint for non-security decisions, and keep it out of upload security boundaries. Fall back to application/octet-stream when confidence is low.
Can xantios/mimey handle unknown extensions, aliases, and compound extensions like .tar.gz?
Because the mapping table is static, uncommon extensions, new formats, MIME aliases, case differences, and compound extensions such as .tar.gz can produce misses or incorrect results. Check the documented return behavior for unknown input, whether it is null, false, an exception, or a fallback, in the version you install. Test representative cases and normalize inputs in your adapter if needed.
How should I configure custom MIME type mappings in Laravel?
Treat custom MIME mappings as application configuration and resolve them through your own adapter rather than relying on undocumented package behavior. Verify whether the installed version exposes runtime registration and, if it does, bootstrap it consistently per request. If not, maintain a small internal override map or fork the static table under the MIT license.
What are alternatives to xantios/mimey?
Common alternatives include Symfony Mime, Laravel's built-in extension guessing helpers, or a pinned internal mapping table maintained by your team. If you already use mimey/mimey, introduce an internal interface first and adapt the existing implementation before swapping packages. The key is to keep callers independent of the specific lookup library.
Is xantios/mimey actively maintained and production-ready?
The provided assessment flags maintenance and provenance risk: the repository is listed as unknown, stars are low at 33, and the last release was 2021-06-12. That does not automatically break the code, but it increases abandonment and supply-chain review concerns. Approve it only after verifying the canonical repository, license evidence for the mapping data, tests and CI, and a security disclosure path; otherwise fork the mapping or use a maintained alternative.
How should I test xantios/mimey in a Laravel app?
Test it behind your MimeTypeResolver adapter with a representative corpus of extensions and MIME types, including unknown values, aliases, case variations, and compound extensions like .tar.gz. Assert fallback behavior and compare outputs against Symfony Mime or Laravel's guesser before migrating callers. Also run a Composer audit and confirm package discovery and provider behavior on your supported Laravel versions.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console