def is_image_file(filename):
    """Checks if a file is an image.
    
    Arguments:
        filename {str} -- File path.
    
    Returns:
        bool -- True if the path is PNG or JPG image.
    """    
    return any(filename.endswith(extension) for extension in [".png", ".jpg", ".jpeg"])