It seems like you did it correctly, once a resource is attached you just need to use its new ID.
i.e. attach $n /path/to/file.png
will display in the CLI app as (for example) [file.png](http://127.0.0.1:9167/0
As that is a link for the mini server it uses to display resources.
Editing the note in an external app will show the direct path to the resource e.g. 
But internally it should be stored as: 
I don't think the CLI app has the ability to start a mini-server for local resource links other than its own internal ones, it will work for links to online resources but not with local paths.