1Got it to work by echo'ing out the content-type header before echo'ing the $object body.
2
3$objInfo = $s3->get_object_headers('my_bucket', 'test.jpg');
4$obj = $s3->get_object('my_bucket', 'test.jpg');
5
6header('Content-type: ' . $objInfo->header['_info']['content_type']);
7echo $obj->body;