Image Preparation

Inspect Image Dimensions and Bytes Before an Upload

Updated

An image filename does not reliably tell you its real format or dimensions. A file called small.jpg may still be too large for a form, and a renamed extension does not change the encoded content.

Image Information Inspector reads supported decoded image information. It reports dimensions, input bytes, MIME type and a sampled indication of alpha.

Separate the three size questions

A 400 by 300 image has a 4:3 ratio and 120,000 pixels. Its file bytes depend on content and encoding. Neither number tells you a physical print size without a chosen resolution.

The dimensions reflect supported orientation correction. When PHP EXIF handling rotates a sideways JPEG before inspection, the reported width and height can be swapped from its stored orientation.

MIME here comes from the image content, not just the filename. That helps identify a valid PNG or JPEG even when a browser's file label is misleading.

Sampled alpha has a careful label

The inspector checks a bounded sample for transparency. Yes means alpha was observed there. No in sample is not proof that every pixel of the full source is opaque; a tiny transparent detail can be missed.

Use an exact pixel inspection or a careful visual review when that distinction matters to an asset. Do not treat the sampled result as a forensic file analysis.

The tool does not list every EXIF tag, certify a file as safe or determine whether a photo satisfies an application policy. It also does not resize or compress the image.

Compare the reported bytes and dimensions with the destination's actual rules. If the file exceeds a pixel limit, resize it. If only bytes are too high, examine the format and compression choices instead of changing unrelated settings.

Join the conversation

Your email address will not be published. Required fields are marked *

Explore Whatson tool information