code: def tag(self, alt='', use_size=None, **attrs):
          
          if use_size is None:
              if getattr(self, '_dimensions_cache', None):
                  use_size = True
              else:
                  try:
                      self.storage.path(self.name)
                      use_size = True
                  except NotImplementedError:
                      use_size = False
          attrs['alt'] = alt
          attrs['src'] = self.url
          if use_size:
              attrs.update(dict(width=self.width, height=self.height))
          attrs = ' '.join(['%s="%s"' % (key, escape(value))
                            for key, value in sorted(attrs.items())])
          return mark_safe('<img %s />' % attrs)
docs: Return a standard XHTML ``<img ... />`` tag for this field.
  
          :param alt: The ``alt=""`` text for the tag. Defaults to ``''``.
  
          :param use_size: Whether to get the size of the thumbnail image for use
              in the tag attributes. If ``None`` (default), the size will only
              be used it if won't result in a remote file retrieval.
  
          All other keyword parameters are added as (properly escaped) extra
          attributes to the `img` tag.