text: Q:
  
  C#: Remote Image size without downloading it
  
  I have an image's URL. Is it possible to find out its size(in bytes) and dimensions without downloading the complete image?
  EDIT
  HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
  req.Method = "HEAD";
  HttpWebResponse resp = (HttpWebResponse)(req.GetResponse());
  System.Console.WriteLine(resp.ContentLength);
  
  I have written this code. It works fine for first two time and the third time it gives WebException i.e. "operation timed out" irrespective of the image url. Is there something that I am missing here?
  
  A:
  
  No, this is not possible.
  You can get its size in bytes by issuing an HTTP HEAD command (instead of a GET); this will return the HTTP headers only, omitting the contents.
  The HTTP header of an image will return its size in bytes:
  Content-length: 6372
  Content-type: image/jpeg
  
  but not its dimensions.
  So you'll have to do an HTTP GET...
  
  