Thread:Project:Support desk/use php to get image filename path

How can I use php code in an extension to find the image path? I want to run the extension on any page so I don't want to specify the imagename manually. eg I have an image 'sunset.jpg' on one page. I could use $f = wfFindFile( 'Sunset.jpg' ); But I want to make it work on every page and not have to input the filename each time. How can I use php to find $image_name so I can use the code $f = wfFindFile( $image_name ); thanks