I have some images that are pulled from a server and $imgUrl holds the path of the image.
Right now I use <img src="<?php echo $imgUrl ?>" width="100" height="200"/> or CSS to scale down the image, but I want to do it in PHP so that I will serve already scaled images to the DOM
Any ideas?
Thanks
This solution will cause the thumb to be created when it is requested for the first time. All future requests will fetch the already created thumb. It is using ImageMagick:
HTML:
PHP (script.php):