Skip to content

Inconsistencies and problems in when images are rendered from RST #112

Closed
@mila

Description

@mila

Investigating pypi/warehouse#4023, I found multiple related problems:

  • HTML code for SVG images can be quite different from other image types.
  • For SVG, width and height are assigned to width="..." and height="..." attributes, so relative dimensions cannot work.
  • For non-SVG image types, width and height are ignored.
  • For SVG images, align="..." attribute is set, which does not help with styling.
  • For non-SVG images, align is ignored.
  • For most images, alt="" fallbacks to image URL, not for SVG.
  • Detection of SVG is broken, e.g. URL like .../django-multi-gtfs.svg?branch=master is not detected as SVG.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions