Skip to content

Leftovers from #1880: HTML import: images (data: URIs, cid:/http via a caller resolver, sized placeholders) #1898

Open

Description

@yeroo

Leftovers from #1880 (PR #1897): minor review findings and plan items deferred by the loop.

  • plan-alt (minor, plan v2 out of scope): Suite: draw an imported image placeholder's alt text inside its frame
  • plan-size (minor, plan v2 out of scope): HTML import images: percentage sizes, max-width and floating (align/float) images
  • plan-base (minor, plan v2 out of scope): HTML import images: and MHTML parts
  • plan-fmt (minor, plan v2 out of scope): HTML import images: SVG/WebP, background-image, /srcset
plan-alt

Out of scope in #1880's plan. An unresolved <img> with a size imports as a placeholder picture (a 1×1 grey PNG stretched to the size) whose wp:docPr descr is the alt text. Word shows that as the picture's Alt Text; the suite draws only the grey box. Draw the descr text inside the picture frame (clipped) so a mail with its images refused still shows "Company logo" etc.

plan-size

Out of scope in #1880's plan. Image sizing in the HTML import reads CSS/attribute lengths only: percentage widths/heights (width="100%", CSS width:50%) are ignored, max-width/max-height are not applied (only the body-width cap), and float / align=left|right images stay inline instead of becoming floating (anchored) pictures.

plan-base

Out of scope in #1880's plan. Relative <img src> values resolve against the page's own folder only: a <base href> in the page is ignored. MHTML (.mht/.mhtml, multipart/related with Content-Location/cid: parts) is not read, though it is what Word's "Single File Web Page" saves; its parts could feed the same image resolver.

plan-fmt

Out of scope in #1880's plan. Only PNG, JPEG, GIF and BMP image bytes are embedded by the HTML import; SVG (Word needs a PNG fallback beside asvg:svgBlip) and WebP become placeholders. CSS background-image, <picture>/<source> and srcset are not read.

Source: #1880, PR #1897
Severity: minor

Activity

  1. added
    follow-upfiled automatically by an agworkbench loop
    priority:P2correctness defect that blocks nothing open
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upfiled automatically by an agworkbench looppriority:P2correctness defect that blocks nothing open

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions