How to output custom headers?

hello. I need to set custom headers based on url patterns

if *.jpg, output content-type image/jpeg
if .gif output content-type image/gif
and some others

what can I do ? any help would be greatly appreciated

Thats something you need to do on your web server, respectively any standard web server should do this automatically.