Does getimagesize use an extra HTTP request or can it find out the size remotely?
NOTE: The image is external
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.