from pathlib import Path


def ispic(path: Path) -> bool:
    """
    Checks if file belongs to picture by his filename.
    """
    # path.suffix -> '.jpg'
    # path.suffix[1:] -> 'jpg
    return path.suffix[1:].upper() in {'PNG', 'JPG', 'GIF', 'JPEG', 'BMP'}