Local files start with a prefix in the browser:
C:\User\Shiro\Desktop\example.png =>
file:///C:/User\Shiro/Desktop/example.png
When opening some local file by menu File>Open, or by dragging a file from file explorer into a browser window, that prefix appears automatically.
When opening it by macro, using open(path), that prefix is NOT added automatically and browser shows error.