exif

exif reads image metadata without changing the image: grouped EXIF fields, a compact summary, GPS coordinates, JSON output and an embedded thumbnail when one exists.

DataVersion 1.2.4Stable
lil-terminal

Overview

exif is a read-only metadata inspector for images: show grouped EXIF data, a compact summary, GPS coordinates, embedded thumbnails, or clean JSON that can be redirected to a file for further processing.

Metadata is optional, not guaranteed

A camera or image processor may omit EXIF, GPS or the embedded thumbnail entirely. A missing field is a normal result; GPS metadata can also expose a location when an image is shared.

Syntax

lil-terminal
exif <file> [options]

Reference

exif <file>

show EXIF metadata

exif <file> -t [dst] [-f]

extract the embedded thumbnail

-f

allow replacement when extracting a thumbnail

-i

show a compact file, image and camera summary

-g

show GPS coordinates and a map URL

-json

show complete EXIF data as formatted JSON

How to use it

Use exif images/photo.jpg -i for a short camera and image summary. -g shows GPS and a map link if coordinates exist; -json exports all available EXIF fields. -t [dst] extracts only a thumbnail already embedded in the image; -f allows replacement of the destination and is valid only with -t.

Limits and safety

The PHP EXIF extension and a readable image are required. Not every JPEG contains EXIF, GPS or a thumbnail, and -t cannot create a thumbnail that is missing. The JSON output may include private location or camera details: inspect it before publishing. exif does not edit metadata or resize images; img handles image conversion.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Inspect the image and export metadata

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install exif
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install exif -m
Exact public version

Install exactly this published version.

install exif -v 1.2.4
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade exif
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install exif -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Inspect the image and export metadata
exif images/photo.jpg -i
File         sandbox/images/photo.jpg
Size         885 B
MIME         image/jpeg
Dimensions   40x30
Camera       Example Camera Sandbox 1
Date         2026:11:01 12:00:00
Orientation  1
GPS          12.0541667, -77.0750000
Thumbnail    -
Show GPS coordinates and a map URL
exif images/photo.jpg -g
Latitude   12.0541667
Longitude  -77.0750000
Map        https://maps.google.com/?q=12.0541667,-77.0750000
Show EXIF metadata
exif images/photo.jpg
[FILE]             
FileName           photo.jpg
FileDateTime       1793563170
FileSize           885
FileType           2
MimeType           image/jpeg
SectionsFound      ANY_TAG, IFD0, GPS
                   
[COMPUTED]         
html               width="40" height="30"
Height             30
Width              40
IsColor            1
ByteOrderMotorola  1
                   
[IFD0]             
Make               Example Camera
Model              Sandbox 1
Orientation        1
DateTime           2026:11:01 12:00:00
GPS_IFD_Pointer    120
                   
[GPS]              
GPSLatitudeRef     N
GPSLatitude        ["12/1","3/1","15/1"]
GPSLongitudeRef    W
GPSLongitude       ["77/1","4/1","30/1"]
Show complete EXIF data as formatted JSON
exif images/photo.jpg -json
{
    "FILE": {
        "FileName": "photo.jpg",
        "FileDateTime": 1793563170,
        "FileSize": 885,
        "FileType": 2,
        "MimeType": "image/jpeg",
        "SectionsFound": "ANY_TAG, IFD0, GPS"
    },
    "COMPUTED": {
        "html": "width=\"40\" height=\"30\"",
        "Height": 30,
        "Width": 40,
        "IsColor": 1,
        "ByteOrderMotorola": 1
    },
    "IFD0": {
        "Make": "Example Camera",
        "Model": "Sandbox 1",
        "Orientation": 1,
        "DateTime": "2026:11:01 12:00:00",
        "GPS_IFD_Pointer": 120
    },
    "GPS": {
        "GPSLatitudeRef": "N",
        "GPSLatitude": [
            "12/1",
            "3/1",
            "15/1"
        ],
        "GPSLongitudeRef": "W",
        "GPSLongitude": [
            "77/1",
            "4/1",
            "30/1"
        ]
    }
}
Handle a missing image
exif images/photo.jpg -t
Embedded thumbnail not found
Extract the embedded thumbnail
exif images/photo.jpg -t tmp/preview.jpg -f
Embedded thumbnail not found
Allow replacement when extracting a thumbnail
exif images/photo.jpg -f
-f requires -t
Show GPS coordinates and a map URL
exif images/photo.jpg -i -g
Choose one EXIF output mode
Show a compact file, image and camera summary
exif images/plain.jpg -i
File        sandbox/images/plain.jpg
Size        631 B
MIME        image/jpeg
Dimensions  12x8
Thumbnail   -
Show GPS coordinates and a map URL
exif images/plain.jpg -g
GPS data not found
Show EXIF metadata
exif config/app.xml
Not an image file
Show EXIF metadata
exif images/missing.jpg
Image file not found
Show EXIF metadata
exif images/photo.jpg -unknown
?

File used in this example: sandbox/images/photo.jpg

The example uses a file or directory from the protected /sandbox/ documentation workspace.

[binary file: photo.jpg]

Related documentation

Current public release

v1.2.42026-10-31

Clear input and GPS validation

Non-image files are rejected clearly. GPS coordinates require valid references and ranges; a thumbnail cannot overwrite its source image.