Image headers with PHP
If you ever need to send an image file with PHP from the web server to the web browser you need to add an additional header using the header() function so the browser knows it’s an image and not regular HTML. This post looks at the headers you need to use.