Text of docs.python.org › 3.16 › library › imghdr.html as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

imghdr — Determine the type of an image — Python 3.16.0a2 documentation

Navigation index modules | next | previous | Python » 3.16.0a2 documentation » The Python standard library » Removed Modules » imghdr — Determine the type of an image | Theme | imghdr — Determine the type of an image ¶ Deprecated since version 3.11, removed in version 3.13. This module is no longer part of the Python standard library. It was removed in Python 3.13 after being deprecated in Python 3.11. The removal was decided in PEP 594 .

Possible replacements are third-party libraries from PyPI: filetype , puremagic , or python-magic . These are not supported or maintained by the Python core team. The last version of Python that provided the imghdr module was Python 3.12 . Previous topic distutils — Building and installing Python modules Next topic imp — Access the import internals This page Report a bug Improve this page Show source « Navigation index modules | next | previous | Python » 3.16.0a2 documentation » The Python standard library » Removed Modules » imghdr — Determine the type of an image | Theme | © Copyright 2001 Python Software Foundation.

This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License. See History and License for more information. The Python Software Foundation is a non-profit corporation. Please donate. Last updated on Nov 20, 2026 (05:01 UTC). Found a bug ? Created using Sphinx 9.1.1.