Skip to content

Missing headshot\_url for Franco Colapinto (driver\_number 43) — official image available #224

@hericlibong

Description

@hericlibong

Problem

The headshot_url is always null for Franco Colapinto (driver_number 43), even though his official portrait is available on formula1.com:

https://media.formula1.com/d_driver_fallback_image.png/content/dam/fom-website/drivers/F/FRACOL01_Franco_Colapinto/fracol01.png.transform/1col/image.png


Proposed solution

When setting driver data, if headshot_url is missing for driver 43, inject the official URL above as a fallback.
This logic can be added to [drivers.py](https://github.com/br-g/openf1/blob/main/src/openf1/services/ingestor_livetiming/core/processing/collections/drivers.py),

for example (pseudo code):

if driver.driver_number == 43 and not driver.headshot_url:
    driver.headshot_url = "https://media.formula1.com/d_driver_fallback_image.png/content/dam/fom-website/drivers/F/FRACOL01_Franco_Colapinto/fracol01.png.transform/1col/image.png"

This is a temporary workaround until the upstream data includes the image.


Bonus

I have tested this approach locally and in my own script (race_chart_builder.py) and can submit a PR from a dedicated branch if helpful.

Thanks for your work on OpenF1!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions