Setting a hard limit for image size using PHP
<p>I have this script for displaying a slideshow for a client.</p>

<p>I'm looking for a quick way of making the "<strong>img</strong>" not go over a certain size.</p>

<p><strong>This is my original code:</strong> </p>

<pre><code>&lt;script type="text/javascript"&gt;
$(function() {
$('#test2').crossSlide({
  speed: 15,
  fade: 1
}, [
&lt;?php
$directory = "photos/";
$images = glob("" . $directory . "*.jpg");
$arrLength = count($images);
foreach($images as $key=&gt;$image){
echo("{src: '$image', dir: '$quotes[$random]'}");
if($key &lt; $arrLength - 1){  echo ", "; }
}
?&gt;
]);
});
&lt;/script&gt;
</code></pre>

<p>Prehaps I could use some sort of external file?</p>

<p>Link it like.. image.php?img=foo.jpg (with the max script in there?)</p>

<p>Any help would be great,</p>

<p>Thanks!</p>
