WP1270: Improve media search performace if file ID is available