Get first post's image


Active member
How can I grab an image attachment from the first post of a thread? And would it work in a custom template?

I tried using something like this:


But don't know how I can get it working. Any ideas?


Well-known member
A little more info and context would be helpful. For example, in which template do you want to „grab“ the attachment? Can there be more than one attachment in the first post? If so, can there be more than one image?


Well-known member
K, so you want to access the first attachment of the first post. That should be straightforward.. Would this custom template be included in another template?