use strict; print "Content-type: image/jpg\n\n"; my $file_name = "./images/picture.jpg"; binmode IMAGE; binmode STDOUT; open IMAGE, $file_name or die "ERROR $!"; while(read IMAGE, $buff, 1024) { print STDOUT $buff; } close IMAGE; 1;