def get_image_data(image):
    """
    Return a mapping of Image-related data given an `image`.
    """
    exclude = ["base_location", "extracted_to_location", "layers"]
    image_data = {
        key: value for key, value in image.to_dict().items() if key not in exclude
    }
    return image_data