<?php
/*
Plugin Name: Trim attachment page URI
Description: Removes the trailing slash from attachment page URIs
Author: Sam
Version: 0.1
*/ 

add_filter('attachment_link', 'trim_attachment_uri');

function trim_attachment_uri($uri) {
	return rtrim( $uri, '/' );
}
?>