How can I perform checks on the images width and height?
$image_size = getimagesize($image_temp);
the third element of the array shows:
width="1679" height="939"
I was wondering how I can check whether the width of the image is over 1000 and if it is, I could change the width to 1000px;
Thanks 😀
Use the 0th element to check the condition and generate the output yourself, e.g.:
Or, if you’d like to keep the height: