I had a similar problem on my local testserver and local testdomains e.g.: www.testdomain.loc with the function GetImageSize()
;
Solved it by adding the hostname in the hosts file on the local server:
In the file /etc/hosts I added:
192.168.1.1 www.testdomain.loc
Hope this helps anyone