<?php @include_once "Mime.class.php"; $file = "image.jpg"; $mime = Mime::getInstance(); $mimeType = $mime->getMimeType($file); header('Content-Type: ' . $mimeType); echo file_get_contents($file); ?>