This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Link File Info


For posts, any links to local media (images, documents, etc.) will automatically have the file type and size appended in parentheses, so visitors to your blog will know what they’re about to download when they click links to media.


  • Requires PHP 5+
  • Only applies for full posts, not comments or post excerpts.
  • Specifically only works for media files uploaded using WordPress’ media upload function (i.e. files in the wp-uploads directory).
  • Parses every post through DOMDocument on view, so unlikely to be wildly efficient.
  • Link parsing might be a bit rough – needs more extensive testing.
  • Invokes the ‘file’ program to figure out file types, which gives very pretty and accurate output, but again probably isn’t very efficient.


  1. Upload link-file-info.php to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to the Media Settings page in WordPress and make sure “Path to ‘file’ command” is set correctly for your system (it defaults to /usr/bin/file).

Contributors & Developers

“Link File Info” is open source software. The following people have contributed to this plugin.

Translate “Link File Info” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Map link URLs to file paths based on WordPress upload URL and file path, rather than (unreliably) joining a (hopefully correct) relative URL to the base path of the wordpress install.
  • Display file size even if file type info unavailable.


  • More reliable determination of hostname from site url


  • Add option for path to ‘file’ command
  • Add lfi_debug GET param to dump out ignored links as comments.


  • Verify prerequisites (PHP5 + DOM extension) on plugin activation.


  • Initial version