Try this:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !$
RewriteCond %{HTTP_REFERER} !http://www.yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !http://www.yourdomain.com [NC]
RewriteRule .*.(gif|GIF|jpg|JPG|mpg|MPG|Mpeg|mpeg|MPEG|rm|RM)$ http://www.yourdomain.com [R,L]
It will protect Gif, JPG, MPG, MPEG, and RM files