I have search for a while, and there is a function call get_image_dimensions(), however, as to my understanding, it works for the images which are downloaded or say local. So, any functions or solution like getimagesize in PHP, that we can just get the dimension of an image via URL, instead of path to local?
PHP can open a URL as it does a file. This could be a boon (as in your case), or a bane (as in remote file inclusion vulnerability).
Python opts to be explicit in that a file is a file, and a remote resource (URL, for example), is a remote one.
If you need some utility function to get image size from a remote resource, you probably need to write a wrapper to the local one. Usually you only need to read about 4096 bytes to determine the image size.
A little more work, yes, but there's no magic like in PHP.
Is there a function for Python which like getimagesize in PHP?