Thread:Project:Support desk/use php to get image filename path/reply (3)

what you want to do is not advisable as a template.

Ill look thru the developer documentation and see if there is a hook or object reference the currently loaded page.