PHP:getimagesize对于上传的文件返回false

I know there are many similar questions but none of them addresses this particular problem. Anyway, I'm trying to get the uploaded image dimensions before getting it saved on the server. Bellow is the code that I tried so far

print_r($_FILES);
$temp = getimagesize($_FILES['aaiu_upload_file']['tmp_name']);
print_r($temp);
var_dump($temp);

it outputs:

Array
(
    [aaiu_upload_file] => Array
        (
            [name] => Screenshot_4.png
            [type] => image/png
            [tmp_name] => /home/username/tmp/phpN4uRRA
            [error] => 0
            [size] => 19765
        )

)

bool(false)

So, is there something I'm doing wrong? your help is highly appreciated.

My PHP Version is 7.3.1

As in php getimagesize Manual

use this to get image dimension :

list($width, $height, $type, $attr) = getimagesize($_FILES['aaiu_upload_file']['tmp_name']);
echo $width.'x'.$height;