Cannot use images field for Dify Extractor #20794

Closed
opened 2026-02-21 20:09:01 -05:00 by yindo · 1 comment
Owner

Originally created by @paolopepe00 on GitHub (Dec 4, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.10.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I'm trying to create a knowledge pipeline using the Dify extractor. It successfully extracts the images, and the returned fields match the expected ones.

✔️ Expected Behavior

However, when I try to use the images field extracted by the extractor as a variable in the following blocks, I’m unable to do so. Is there any way to achieve this?

Originally created by @paolopepe00 on GitHub (Dec 4, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.10.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I'm trying to create a knowledge pipeline using the Dify extractor. It successfully extracts the images, and the returned fields match the expected ones. ### ✔️ Expected Behavior However, when I try to use the images field extracted by the extractor as a variable in the following blocks, I’m unable to do so. Is there any way to achieve this?
yindo added the 🐞 bug label 2026-02-21 20:09:01 -05:00
yindo closed this issue 2026-02-21 20:09:01 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 4, 2025):

This is a known limitation in Dify v1.10.1: the images field extracted by the Dify Extractor is not automatically available as a variable in subsequent workflow blocks. By default, only fields explicitly selected in the Variable Aggregator node (usually just text) are propagated downstream, so images is not accessible unless you add it to the aggregator's selector list. The workflow engine also only allows certain types (string, number, array[file]) to be passed between nodes, so complex arrays like images (array of objects) require extra steps to use downstream reference.

Workaround:

  1. Add a Template node right after your extractor. Use a Jinja2 template to serialize the images array into a JSON string. Example template:
    [
    {% for image in extractor.images %}
      {
        "mime_type": "{{ image.mime_type }}",
        "name": "{{ image.name }}",
        "preview_url": "{{ image.preview_url }}",
        "size": {{ image.size }}
      }{% if not loop.last %},{% endif %}
    {% endfor %}
    ]
    
  2. Add a Parameter Extractor (JSON parser) node after the Template node to parse the JSON string into an array. Now, you can connect this output to an Iteration or Code node, and each image object will be available as item for further processing reference.

If you want images to be directly selectable in the UI as an array[object], make sure the extractor's output_schema defines the structure of each item in detail (not just type: object, but with explicit properties) reference.

If you need the actual image files, check if they're included in the extractor's files output—sometimes images are also added there as file objects, which can be iterated directly.

In newer Dify versions, there are improvements to variable handling and UI, but in v1.10.1, this manual workaround is required.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 4, 2025): <!-- Answer --> This is a known limitation in Dify v1.10.1: the `images` field extracted by the Dify Extractor is not automatically available as a variable in subsequent workflow blocks. By default, only fields explicitly selected in the Variable Aggregator node (usually just `text`) are propagated downstream, so `images` is not accessible unless you add it to the aggregator's selector list. The workflow engine also only allows certain types (string, number, array[file]) to be passed between nodes, so complex arrays like `images` (array of objects) require extra steps to use downstream [reference](https://github.com/langgenius/dify/issues/25671). **Workaround:** 1. **Add a Template node** right after your extractor. Use a Jinja2 template to serialize the `images` array into a JSON string. Example template: ```jinja2 [ {% for image in extractor.images %} { "mime_type": "{{ image.mime_type }}", "name": "{{ image.name }}", "preview_url": "{{ image.preview_url }}", "size": {{ image.size }} }{% if not loop.last %},{% endif %} {% endfor %} ] ``` 2. **Add a Parameter Extractor (JSON parser) node** after the Template node to parse the JSON string into an array. Now, you can connect this output to an Iteration or Code node, and each image object will be available as `item` for further processing [reference](https://github.com/langgenius/dify/discussions/27726). If you want `images` to be directly selectable in the UI as an array[object], make sure the extractor's `output_schema` defines the structure of each item in detail (not just `type: object`, but with explicit properties) [reference](https://github.com/langgenius/dify/discussions/29051#discussioncomment-15146919). If you need the actual image files, check if they're included in the extractor's `files` output—sometimes images are also added there as file objects, which can be iterated directly. In newer Dify versions, there are improvements to variable handling and UI, but in v1.10.1, this manual workaround is required. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/57cc9655-bd17-4c82-8779-eaaa105ae5a9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/57cc9655-bd17-4c82-8779-eaaa105ae5a9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/57cc9655-bd17-4c82-8779-eaaa105ae5a9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/57cc9655-bd17-4c82-8779-eaaa105ae5a9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/57cc9655-bd17-4c82-8779-eaaa105ae5a9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/57cc9655-bd17-4c82-8779-eaaa105ae5a9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/57cc9655-bd17-4c82-8779-eaaa105ae5a9?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20limitation%20in%20Dify%20v1.10.1%3A%20the%20%60images%60%20field%20extracted%20by%20the%20Dify%20Extractor%20is%20not%20automatically%20available%20as%20a%20variable%20in%20subsequent%20workflow%20blocks.%20By%20default%2C%20only%20fields%20explicitly%20selected%20in%20the%20Variable%20Aggregator%20node%20%28usually%20just%20%60text%60%29%20are%20propagated%20downstream%2C%20so%20%60images%60%20is%20not%20accessible%20unless%20you%20add%20it%20to%20the%20aggregator%27s%20selector%20list.%20The%20workflow%20engine%20also%20only%20allows%20certain%20types%20%28string%2C%20number%2C%20array%5Bfile%5D%29%20to%20be%20passed%20between%20nodes%2C%20so%20complex%20arrays%20like%20%60images%60%20%28array%20of%20objects%29%20require%20extra%20steps%20to%20use%20downstream%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/issues/25671%29.%0A%0A%2A%2AWorkaround%3A%2A%2A%20%20%0A1.%20%2A%2AAdd%20a%20Template%20node%2A%2A%20right%20after%20your%20extractor.%20Use%20a%20Jinja2%20template%20to%20serialize%20the%20%60images%60%20array%20into%20a%20JSON%20string.%20Example%20template%3A%0A%20%20%20%60%60%60jinja2%0A%20%20%20%5B%0A%20%20%20%7B%25%20for%20image%20in%20extractor.images%20%25%7D%0A%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%22mime_type%22%3A%20%22%7B%7B%20image.mime_type%20%7D%7D%22%2C%0A%20%20%20%20%20%20%20%22name%22%3A%20%22%7B%7B%20image.name%20%7D%7D%22%2C%0A%20%20%20%20%20%20%20%22preview_url%22%3A%20%22%7B%7B%20image.preview_url%20%7D%7D%22%2C%0A%20%20%20%20%20%20%20%22size%22%3A%20%7B%7B%20image.size%20%7D%7D%0A%20%20%20%20%20%7D%7B%25%20if%20not%20loop.last%20%25%7D%2C%7B%25%20endif%20%25%7D%0A%20%20%20%7B%25%20endfor%20%25%7D%0A%20%20%20%5D%0A%20%20%20%60%60%60%0A2.%20%2A%2AAdd%20a%20Parameter%20Extractor%20%28JSON%20parser%29%20node%2A%2A%20after%20the%20Template%20node%20to%20parse%20the%20JSON%20string%20into%20an%20array.%20Now%2C%20you%20can%20connect%20this%20output%20to%20an%20Iteration%20or%20Code%20node%2C%20and%20each%20image%20object%20will%20be%20available%20as%20%60item%60%20for%20further%20processing%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/discussions/27726%29.%0A%0AIf%20you%20want%20%60images%60%20to%20be%20directly%20selectable%20in%20the%20UI%20as%20an%20array%5Bobject%5D%2C%20make%20sure%20the%20extractor%27s%20%60output_schema%60%20defines%20the%20structure%20of%20each%20item%20in%20detail%20%28not%20just%20%60type%3A%20object%60%2C%20but%20with%20explicit%20properties%29%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/discussions/29051%23discussioncomment-15146919%29.%0A%0AIf%20you%20need%20the%20actual%20image%20files%2C%20check%20if%20they%27re%20included%20in%20the%20extractor%27s%20%60files%60%20output%E2%80%94sometimes%20images%20are%20also%20added%20there%20as%20file%20objects%2C%20which%20can%20be%20iterated%20directly.%0A%0AIn%20newer%20Dify%20versions%2C%20there%20are%20improvements%20to%20variable%20handling%20and%20UI%2C%20but%20in%20v1.10.1%2C%20this%20manual%20workaround%20is%20required.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29138)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20794