Local hosted image not displaying via public https

I’ve uploaded a image to my local /config/www/ folder. When trying to accessing this via my normal url https://publicdns.com/local/filename.png, I get a black page with an image that can’t be loaded. When accessing the file via http://192.168.x.x:8123/local/filename.png, the file is loaded properly.

I access my HA via https via a ngnix reverse proxy so it’s available public & privatly via the same url. The SSL certificate is stored on ngnix & the connection between the reverse proxy & HA is via http.
In my config yaml file, I’ve added the following code but it doesn’t help

homeassistant:
  allowlist_external_dirs:
    - /config/www

Anybody an idea?