This is currently unsupported. See:
- Images and attachments are not encrypted · Issue #5084 · laurent22/joplin · GitHub
- Requesting encryption of local Joplin data (at rest encryption)
- Attachment locally unencrypted
- Is the local database unencrypted?
- Does Joplin encrypt md files at rest (both locally and remotely), or only in transit?
- Yet another plea for local database encryption. : joplinapp
If you require a security measure like this:
- Use one of multiple different secure notebook apps that support this feature
- Use full disk encryption, VeraCrypt, Cryptomator, etc.
- Contract someone to make a private build for you
- Develop it yourself