i don’t know if this is the right way, but i solved it
in the filter: “parse_request”.
if($wp->query_vars[‘name’] == ‘image’)
{
$imageID = (int) trim($wp->query_vars[‘page’], ‘/’);
$picture = nggdb::find_image($imageID);
$file = $picture->imagePath;
$mime = mime_content_type($file);
header(“Content-type: {$mime}”);
die(file_get_contents($file));
}
the parameters name and page works, but sounds bad.
Any one got a better way to solve this?