1 Vote Vote

PHP Maximum Image Size

Posted by topdog 298 days ago Questions| php image size All

I have this script for displaying a slideshow for a client.

I'm looking for a quick way of making the "img" not go over a certain size.

This is my original code:

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

Prehaps I could use some sort of external file?

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

Any help would be great,

Thanks!

Originally asked by: Alexwhin on Stack Overflow

Discuss Bury


Who Voted for this Question