Image dimensions, type, and file size

Use this image inspector to see file type, pixel dimensions, file size, aspect ratio, and megapixels before you compress, convert, or resize. Performance reports say improve images. They do not say whether you are looking at a 6 megapixel PNG of a sunset or a 64-pixel icon saved as JPEG at quality 100.
Aspect as a reduced ratio catches the 1000x667 that is "almost 3:2" and the 1200x1200 that will be crushed into a 1.91:1 preview. Megapixels tell you if resize is mandatory. Bytes per pixel tell you if the codec is wrong. Then leave: compress, convert, resize, or generate srcset.
We do not dump GPS here. If you need it gone, remove the EXIF. If you need colors, use the picker. This page is facts for the next click.
JavaScript to read image dimensions from a File
The inspector wraps what the browser already knows about a local File. Useful if you are wiring your own dropzone.
const img = new Image();
img.onload = () => {
const mp = (img.naturalWidth * img.naturalHeight) / 1e6;
const bpp = file.size / (img.naturalWidth * img.naturalHeight);
console.table({
type: file.type,
width: img.naturalWidth,
height: img.naturalHeight,
megapixels: mp.toFixed(2),
bytes: file.size,
bytesPerPixel: bpp.toFixed(2),
});
URL.revokeObjectURL(img.src);
};
img.src = URL.createObjectURL(file);<img src="unknown.png" alt="" width="WID" height="HGT">Frequently asked questions
What does bytes per pixel mean on an image?
Photographs as JPEG often sit well under 1. A PNG screenshot of a photo is frequently wasteful. Animated GIFs will look heavy for their pixel box. Use it as a smell test, then convert or compress.
Does the image inspector show full EXIF?
Not in this inspector. We report what the browser and the file object know without a parser: type, dimensions, weight. Strip metadata if the contents of EXIF are the concern.
Why is a PNG photo so large?
PNG is a poor codec for photographs. Convert to JPEG or WebP. Keep PNG for logos, UI, and transparency.
What image size in megapixels is enough for the web?
A 720 CSS-pixel column at 2x is about 1.5 megapixels at 1440 wide. A 12 megapixel phone export is almost always oversized for a page.
Does inspect image upload the file?
No. Inspection starts when you add files. Nothing is sent.
Can I inspect a batch of images?
Yes. Drop a batch and read the table on each card before you pick compress, convert, or resize.