If you are not willing to filter only image uploads, i.e., all uploaded media will reside in the same folder/subdomain, then there’s a simple configuration solution:
- go to options-media.php
- set the Store uploads option to
wp-content/uploads
- set the Full URL option to
http://uploads.yourdomain.com
- create a subdomain making the uploads folder be
http://uploads.yourdomain.com