Skip to main content

Python library to detect image type from a few bytes

Project description


Python library to detect image type from a few bytes, focussed on webby formats (old and new)

Currently supports:

  • JPEG
  • WEBP
  • GIF
  • PNG
  • HEIC
  • AVIF
  • BMP
  • TIFF


pip install whatimage


import whatimage

with open('image.jpg', 'rb') as f:
    data =
fmt = whatimage.identify_image(data)


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for whatimage, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size whatimage-0.0.3-py3-none-any.whl (7.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size whatimage-0.0.3.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page