mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-17 17:02:01 -05:00
[GH-ISSUE #22601] feat: Preprocess PDFs as images for VL models #106755
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ccdv-ai on GitHub (Mar 12, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22601
Check Existing Issues
Verify Feature Scope
Problem Description
OWUI preprocess PDF using various backend to convert it to text. We should be able to convert a pdf to images (or img + text) for new VL models (e.g qwen 3.5).
Desired Solution you'd like
Add an option to process pdf as images if the model can read images.
DPI (image quality) should be a parameter.
Alternatives Considered
No response
Additional Context
No response
@rgaricano commented on GitHub (Mar 12, 2026):
You can also use a function/tool similar to this:
@ccdv-ai commented on GitHub (Mar 12, 2026):
Thank you.
I'm wondering if it is possible to intercept the file and process it with a filter before the conversion. But Im pretty sure the conversion to text cannot be skiped and will be added to prompt anyway.
@rgaricano commented on GitHub (Mar 12, 2026):
@ccdv-ai
For skip the openwebui file processing core, set the
file_handler = Trueflag (it enables custom file processing)With a Filter Function:
@JiwaniZakir commented on GitHub (Mar 13, 2026):
I can pick this up. The PDF processing logic lives in the retrieval pipeline where documents get chunked and embedded — we'd need to add a rendering path using something like pdf2image (poppler-based) to convert each page into a base64-encoded image before passing it to the chat completion payload. The DPI parameter could slot into the document settings alongside the existing chunk size/overlap config. I'll put together a PR.
@rgaricano commented on GitHub (Mar 13, 2026):
@ccdv-ai,
I debugged & made some changes, tested and working with qwen3.5_9b
@frenzybiscuit commented on GitHub (Mar 13, 2026):
I'd also like to see this natively supported in OWUI.
@frenzybiscuit commented on GitHub (Mar 13, 2026):
Though, the tools above likely work fine. It would still be nice to see native support.