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.

Filename, size & hash SHA256 hash help File type Python version Upload date
whatimage-0.0.3-py3-none-any.whl (7.2 kB) Copy SHA256 hash SHA256 Wheel py3
whatimage-0.0.3.tar.gz (2.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page