Here's code to do that.
acl imagereq path_beg /image.jpg
reqrep ^Host:\ 1.2.3 Host:\ cdn.site.com if imagereq
But I don't think that's really what you want to do.
reqrep will have haproxy change where it gets the content it serves your user.
HOWEVER: If the user has to go all the way to your server, then you've already wasted most of the benefit of a good CDN. (good CDNs are closer to your users than you are, and your users win by being able to get some of your content from them instead of going all the way back to you)
When you use reqrep, you're just having haproxy pop out to the nearest CDN node to YOU instead of getting it from the server you maintain.
Ideally what you want to do is adjust your HTML to point directly at your CDN.
Take at look at view source for sites like facebook, etc. You'll see their littered with links to URLS like static.ak.fbcdn.net.
static.ak.fbcdn.net is an alias for static.ak.facebook.com.edgesuite.net.
static.ak.facebook.com.edgesuite.net is an alias for a749.dsw4.akamai.net.
akamai is a well known CDN provider.
By explicitly putting your cdn content locations in your raw HTML, your user only has to grab your main HTML, and all other content will be directly loaded from a CDN (hopefully) nearer to your user than you are...
You could consider having haproxy send a redirect to the user pointing them at the CDN for the content. But as I said before, if the user has already come all the way to your front door, you're wasting a lot of the benefit of a CDN.