Does getimagesize use an extra HTTP request or can it find out the size remotely?
NOTE: The image is external
It can fetch it remotely or locally:
This parameter [filename] specifies the file you wish to retrieve information about. It can reference a local file or (configuration permitting) a remote file using one of the supported streams.
From the manual .
There will always be at least one HTTP request; otherwise how will it know what you're looking for?
If you're asking whether or not it'll download the file - yes, it will. There's no HTTP header that specifies image dimensions, so it doesn't know until the file is downloaded.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.