code: def image(self, raw_url, title='', alt=''):
          
          if self.check_url(raw_url, is_image_src=True):
              url = self.rewrite_url(raw_url, is_image_src=True)
              maybe_alt = ' alt="%s"' % escape_html(alt) if alt else ''
              maybe_title = ' title="%s"' % escape_html(title) if title else ''
              url = escape_html(url)
              return '<img src="%s"%s%s />' % (url, maybe_alt, maybe_title)
          else:
              return escape_html("![%s](%s)" % (alt, raw_url))
docs: Filters the ``src`` attribute of an image.
  
          Note that filtering the source URL of an ``<img>`` tag is only a very
          basic protection, and it's mostly useless in modern browsers (they block
          JavaScript in there by default). An example of attack that filtering
          does not thwart is phishing based on HTTP Auth, see `this issue
          <https://github.com/liberapay/liberapay.com/issues/504>`_ for details.
  
          To mitigate this issue you should only allow images from trusted services,
          for example your own image store, or a proxy (see :meth:`rewrite_url`).