The Handler.ashx is used to dynamically return a image from a query string. Http handler is similar to regular web form, only faster (~10%, compare with web form) with less functionality.
IsReusable property is usually set to be true to reduce memory footprint and improve performance.
In the sample application pictures are taken from a database. If one prefer to use file system instead then the handler can be changed to.
HttpResponse r = context.Response;
r.ContentType = "image/png";
r.WriteFile("Logo1.png");