def _is_valid_image(file_path):
    """
    **Checks if given file is .jpg, .jpeg or .png file.** Internal function.
    """
    if file_path.endswith(".jpg") or file_path.endswith(".jpeg") or file_path.endswith(".png"):
        return True
    else:
        return False