Replace Line 111 from view.php
<img id="photo" src="<?= $file_path.$file ?>" alt="<?=$line[filename]?>" title="<?=$line[filename]?>" border="0" width="<?=$width?>" />
with
<img id="photo" src="<?= $file_path.$file ?>" alt="<?=$line[filename]?>" title="<?=$line[filename]?>" border="0" style="max-width:500px" />
and
Delete This chunk from the file view.php (line 99-108)
<?
list($file_width, $file_height, $ext) = getimagesize($file_path.$file);
if (!$ext) {echo "Can not get image dimensions!";}
else {
if($file_width>"500") {
$width=500;
} else {
$width=$file_width;
} }
?>
This solution doesn't have any side effects on the script.
What this solution does is eliminate a unnecessary process in PHP from the script and replaces it with a simple inline CSS rule:
max-width: 500px;
hope it helps anyone...

Sign In
Register
Help

MultiQuote