Skip to content

mail +draft-edit: add_inline does not actually insert inline image into HTML body #81

@SoIomon

Description

@SoIomon

Summary

When using mail +draft-edit to add an inline image, the current add_inline / replace_inline behavior is easy to interpret as "insert image into the mail body", but in practice it only adds the MIME inline part and does not insert an <img src="cid:..."> reference into the HTML body.

From a user perspective, this looks like inline image insertion is broken or incomplete.

Repro idea

Use a patch like this with mail +draft-edit:

{
  "ops": [
    {
      "op": "add_inline",
      "path": "./image.png",
      "cid": "demo-inline-image"
    }
  ]
}

Observed behavior

  • The inline MIME part is added
  • But the image is not shown in the mail body unless the user also manually updates the HTML body to include something like <img src="cid:demo-inline-image">
  • If the user does not know this extra step, it feels like inline image insertion failed

Expected behavior

One of these would be much easier to use:

  1. add_inline really inserts the image into the HTML body automatically
  2. Or the CLI provides a higher-level operation for "insert inline image at body position"
  3. Or at minimum the command warns loudly / validates that adding an inline image alone will not make it appear in the body

Why this is confusing

The operation name add_inline strongly suggests that the image will be inserted inline, not just attached as a CID-addressable MIME part. That mismatch makes the feature feel buggy from the caller side.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain/mailPR touches the mail domainenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions