rescaling images in php automaticallly
<p>I tested my site at google page speed they suggested me to serve images rescaled.</p>

<p>Right now for thumbnail I'm using this php</p>

<pre><code>&lt;?php 
if($ad_thumbnails) 
{ 
    if ($row['picfile']) $picfile = "{$datadir[adpics]}/{$row[picfile]}";

    else $picfile = "images/noimage2.png";

    $imgsize = GetThumbnailSize($picfile, $tinythumb_max_width, $tinythumb_max_height);
?&gt;
</code></pre>

<p>What will be the best practice to rescale images automatically by modifying above code?</p>
