How to receive a user supplied path in a package function?

Packages cannot access project files, unless the package is installed inside of the project
If you want to pass an image to your template, you will have to read it in your project and pass the image object to the template

#let img = image("my_nice_image.png")
#show: my-template.with(img)