Skip to content

Conversation

@s1v4-d
Copy link
Contributor

@s1v4-d s1v4-d commented Jan 1, 2026

Adds support for the new image_alt_mode parameter from docling-core, allowing users to choose how alt text is generated for images in markdown export: static, caption, or description.

Closes #2803

Checklist:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2026

DCO Check Passed

Thanks @s1v4-d, all your commits are properly signed off. 🎉

@s1v4-d
Copy link
Contributor Author

s1v4-d commented Jan 1, 2026

MyPy pre-commit check fails because this PR depends on docling-project/docling-core#463 being merged first. Once that's merged and docling-core is updated, mypy will pass.

@mergify
Copy link

mergify bot commented Jan 1, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@dosubot
Copy link

dosubot bot commented Jan 1, 2026

Related Documentation

Checked 9 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@vagenas
Copy link
Member

vagenas commented Jan 9, 2026

Thanks @s1v4-d for the interesting idea.

First of all, some relevant context: the annotation & caption info (as available) is anyway shown by the serializer in the normal "flow", i.e. outside the link text.

Therefore, displaying it again as the link text (i.e. what goes in [here](...)) causes duplication, as shown in the screenshot [1] where I just dumped the output of a PR's test.

What would be a valid alternative is just parametrizing the text that's currently hard-coded to "Image" in [Image](...).
This would add some flexibility, while respective the current scheme & avoiding duplications.
Would you up for that?

[1]
image

@s1v4-d
Copy link
Contributor Author

s1v4-d commented Jan 9, 2026

Thanks @s1v4-d for the interesting idea.

First of all, some relevant context: the annotation & caption info (as available) is anyway shown by the serializer in the normal "flow", i.e. outside the link text.

Therefore, displaying it again as the link text (i.e. what goes in [here](...)) causes duplication, as shown in the screenshot [1] where I just dumped the output of a PR's test.

What would be a valid alternative is just parametrizing the text that's currently hard-coded to "Image" in [Image](...). This would add some flexibility, while respective the current scheme & avoiding duplications. Would you up for that?

[1] image

sure thing

s1v4-d added 3 commits January 9, 2026 22:18
Adds support for the new image_alt_mode parameter from docling-core,
allowing users to choose how alt text is generated for images in
markdown export: static, caption, or description.

Closes docling-project#2803

Signed-off-by: s1v4-d <leelasaisivasubrahmanyamdurga@gmail.com>
Signed-off-by: s1v4-d <leelasaisivasubrahmanyamdurga@gmail.com>
Adds a CLI option to customize the alt text for images in markdown output.
This replaces the default 'Image' text in markdown image links like ![Image](...).

Note: Full functionality requires docling-core to add image_alt_text parameter support.

Closes docling-project#2803

Signed-off-by: s1v4-d <leelasaisivasubrahmanyamdurga@gmail.com>
@s1v4-d s1v4-d force-pushed the feat/image-alt-mode-cli branch from fa34ba4 to c901462 Compare January 9, 2026 17:22
@s1v4-d
Copy link
Contributor Author

s1v4-d commented Jan 12, 2026

Run examples pipelines would pass once the pr on docling-core is merged and released.

@lcs-crr
Copy link

lcs-crr commented Jan 21, 2026

Would this feature only be available on the CLI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Combine generated captions with image references

3 participants