Use getimagesize as fallback