def new_image(self, _imagefile, _alt=None, **kwargs):
        check_flag(kwargs, "ismap")
        if Image is not None:
            try:
                im = Image.open(_imagefile)
            except __HOLE__:
                pass
            else:
                x, y = im.size
                kwargs["width"] = str(x)
                kwargs["height"] = str(y)
                try:
                    im.close()
                except:
                    pass
                del im
        kwargs["src"] = _imagefile # XXX adjust for server alias?
        if _alt:
            kwargs["alt"] = _alt
        img = self.dtd.Img(**kwargs)
        self.append(img)
        return img
dataset/ETHPy150Open kdart/pycopia/WWW/pycopia/WWW/XHTML.py/FlowMixin.new_image