---
title: imghdr
description: Recognize image file formats based on their first few bytes.
---
## what

```python
def what(
    file, h=None
):
```
