Codex tools: Log in
Retrieve attached file path based on attachment ID.
You can optionally send it through the 'get_attached_file' filter, but by default it will just return the file path unfiltered.
The function works by getting the single post meta name, named '_wp_attached_file' and returning it. This is a convenience function to prevent looking up the meta name and provide a mechanism for sending the attached file name through a filter.
<?php get_attached_file( $attachment_id, $unfiltered ); ?>
get_attached_file() is located in