I need to shrink images over the size of 700px to 700px, while leaving images under that size untouched. My current image display code is as follows: <a href="<?php echo $fileurl; ?>"><img src="<?php echo $fileurl; ?>" alt="<?php echo $filename; ?> title="<?php echo $filename; ?>" /></a> Can anyone suggest a good way to do this?
Easy, just add width: In which width is 100% the size of the browser's window or set your own scale but in percentage
You can use getimagesize function to determine width and height of the image, and if they are greater than 700, you need to scale image (imagecopyresampled) or embed <img width=XX height=YY> attributes (but in such case you will have more bandwidth usage because image will be downloaded fullsized and resized by the browser).