Regarding the HTML editor, if you want to use a different path, without all the functions/ hooks that iI will list below , you should use the UPLOAD FROM URL tab, and not the UPLOAD FROM COMPUTER .. that will keep the original URL .
I am not sure about the tracking pixel, how you get it in the RSS (format) or other variables in your system, but the function that sends the images to the editor is a function called image_send_to_editor();
soSo using the next function, will alter the URL that is SENT TO THE EDITOR..
add_filter('image_send_to_editor', 'change_image_url', 20, 8);
$original_URL = 'your_url/not_sure_how/'; // this part you have to pass the original URL..
function change_image_url($html, $id, $caption, $title, $align, $url, $size, $alt)
{
$url = $original_URL ;
return $html;$url;
}
For using outside the editor , the upload path can be intercepted in a LOT of ways, depending on what you really need to do (like iI said, iI do not know HOW you get the RSS.. But, but start with checking and hooking these function :
update_attached_file( $attachment_id, $file )
whatWhat you would hook here is the $file part, which originally is:
$file = _wp_relative_upload_path($file);
asAs you can see, it calls yet another function with $path parameter that you can hook which is :
_wp_relative_upload_path( $path )
This function will change the $path of the image to be relative to the uplaodupload dir..
theThe function update_attached_file();
willwill also update the post_meta hidden field _wp_attached_file
with :
update_post_meta( $attachment_id, '_wp_attached_file', $file );
whichThis is yet another way to control the path. youYou can manipulate that custom_field to your needs. itIt is actually the easiest way IMHO...