How to add custom button on my attachment

Hi,

I am building a power-up for our storage portal. We have already created a power-up where our attachments are coming up in Trello card but I am not getting it. How I can add a custom button on every attachment? Can you direct me where I can find the document? Also, I want one more help like, I am attaching a link to a card through power up but If I want to give a dynamic image to every link so, how I can do that?