You could also play with the mod_rewrite apache module (granted if it's configued).
Put this in your .htaccess file:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^
http://yoursite.com/.*$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$
http://redirectto.com/ [R,NC]