lychee-org/php-exif
A PHP library for reading, writing, and manipulating EXIF metadata in images. It provides an object-oriented API to extract camera, GPS, and exposure details or edit and remove metadata, making it useful for photo galleries, media managers, and image-processing workflows.
exif extension."ext-exif PHP extension being compiled into every runtime. That affects shared-hosting support, container image size, and whether self-hosted/on-prem customers can run the product at all.Consider it when:
exif_read_data() gives you (consistent error handling, typed accessors, broader container/format coverage, no fatal behavior on malformed files).ext-exif in all target environments — shared hosting, slim containers, customer-managed deployments, or Windows/odd builds.MetadataReader interface and treat the package as an implementation detail.Look elsewhere when:
Diligence before committing: confirm the release history is real and recent (the listed date warrants verification), check open-issue responsiveness, and run a spike against a fixture set of your own images — including deliberately corrupt files and privacy-sensitive GPS cases. Have a documented fallback to ext-exif behind the same interface.
To executives (one paragraph): Photo products live or die on metadata — correct orientation, real capture dates, maps, and the ability to strip location data before anything is shared publicly. Today we either depend on a PHP extension that isn't present in every environment we sell into, or we hand-roll parsing. This MIT-licensed reader gives us that capability with no license cost and no infrastructure dependency, and it is the same component the Lychee photo platform relies on. The trade-off is maturity: it's a small, single-sponsor project, so we adopt it behind our own interface with a fallback path. Net: a low-cost enabler for several roadmap items and a privacy control, with contained risk.
To engineering (summary): Pure-PHP EXIF reader, MIT, maintained by the LycheeOrg team for their photo library. Value is portability (no ext-exif requirement), typed/consistent output versus the raw extension, and unit-testability against image fixtures. It is read-only — it will not write or rewrite metadata, so any "strip GPS on export" work needs a separate write path. Maturity is the concern: ~11 stars, no known dependents, one sponsoring project, so upstream fixes arrive on Lychee's schedule, not ours. Recommended integration: wrap it in a MetadataReader port with two adapters — this package as primary, ext-exif as fallback — and pin the version. Validate against a corpus that includes HEIC, corrupt files, and GPS-tagged images before we commit to a format-support claim in the product.
Ask: one engineering spike (timeboxed) to benchmark it against ext-exif on our real image corpus, plus a decision on the adapter abstraction. No procurement or legal work required beyond standard MIT attribution.
How can I help you explore Laravel packages today?