These are two separate web server requests. The first one fetches the html document with the IMG SRC=/cgi-bin/images/whatever.png. This content type should be set to text/html.
The web browser will make a separate request for whatever.png. This will be a separate cgi script that just sets the content type to image/png (i think) and basically prints the binary image file.