How to set figures files folder in pandoc export PDF

Things I have tried

Hello everyone, I tried different things to let Pandoc know that I want to use a specific folder as an attachment folder but only this solution worked:

But I think is not a good solution because it doesn’t show enough flexibility regarding the folder where the attachments are.
I know that Obsidian “doesn’t care” about the folder where the images are located but I’m trying to maintain an attachment folder for each problem for portability purposes

What I’m trying to do

I think a good idea was displayed here:

with this possible implementation:

---
graphics: true
header-includes:
- \graphicspath{{./images/}}
---

![Image](photo.jpg)

Has anyone found a better solution or a feature that I’m not aware of?
Thank you