getResourcePath() does not return the correct path for user defined attachment folder

Hi, I’m tring to get the path of a local image in a plugin by using the API app.vault.adapter.getResourcePath(‘a.png’), however, it returns a wrong path if users have set the Attachment Folder Path.
And there is no function for plugin developers to get the setting of Attachment Folder Path.

1 Like

I think you can use: this.app.vault.getConfig("attachmentFolderPath") see: