def get_html_tag(preview=False, request=None, hires=False, thumbnail=False,
    **extra_attributes):
    """Generate a image tag to render either the original version
        (if ``hires`` set to True), or the thumbnail (if ``thumbnail``
        set to True) or the web version (by default).

        If some ``extra_attributes`` are given, they will be added to
        the image tag as HTML attributes.
        """
