Hello,
I have set up my gallery to show 10 images on a page in 1 column.
I'd like to simply show the original photos that would not exceed 500px in width.
Example: If I have a photo that's 600 in width, it would reduce it to 500 and maintain the proportions.
And if I have a photo that's 400 in width, it will show it as it is.
I've taken a code snippet from a much older gallery system that does this.
$max_width= "500";
$resize_width= "470";
$size = getimagesize($image);
$width= $size[0];
$height= $size[1];
if ($width>$max_width){
$new_width=$resize_width;
}else {
$new_width=$width;
}
Hope that's clear and you get the idea of what I'm trying to accomplish.
Thanks in advance for any advice you may give me.