How can I gzip images without using .htaccess?
Godaddy won't enable mod_gzip for me, so I have to use headers like this:

    <?php 
    ob_start ("ob_gzhandler");
    header("Content-type: text/css; charset: UTF-8");
    header("Cache-Control: must-revalidate");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    $offset = 60 * 60 * 24 * 7;
    $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
    gmdate("D, d M Y H:i:s",
    time() + $offset) . " GMT";
    header($ExpStr);
    ?>

In this case, that would be for CSS files 

Anyways, how can I use that with my images? I mean, making the image: image.php and putting that code at the top but using `header("Content-type: image/png; charset: UTF-8");` doesn't work so, let me know.


How can I gzip images without using .htaccess?
===

Godaddy won't enable mod_gzip for me, so I have to use headers like this:

    <?php 
    ob_start ("ob_gzhandler");
    header("Content-type: text/css; charset: UTF-8");
    header("Cache-Control: must-revalidate");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    $offset = 60 * 60 * 24 * 7;
    $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
    gmdate("D, d M Y H:i:s",
    time() + $offset) . " GMT";
    header($ExpStr);
    ?>

In this case, that would be for CSS files 

Anyways, how can I use that with my images? I mean, making the image: image.php and putting that code at the top but using `header("Content-type: image/png; charset: UTF-8");` doesn't work so, let me know.

