> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload Local Files

<Note>
  Once a knowledge base is created, its data source cannot be changed later.
</Note>

When creating a ready-to-use knowledge base, you can upload local files as its data source:

1. Click **Knowledge** > **Create** > **Create a ready-to-use knowledge base**.

2. Select **Import from file** as the data source, then upload your files.

   * Maximum number of files per upload: 5 (set via `UPLOAD_FILE_BATCH_LIMIT`)

   * Maximum file size: 15 MB (set via `UPLOAD_FILE_SIZE_LIMIT`)

***

**For Images in Uploaded Files**

JPG, JPEG, PNG, and GIF images under 2 MB are automatically extracted as attachments to their corresponding chunks. These images can be managed independently and are returned alongside their chunks during retrieval.

URLs of extracted images remain in the chunk text, but you can safely remove these URLs to keep the text clean; this won't affect the extracted images.

If you select a multimodal embedding model (marked with a **Vision** icon) in index settings, the extracted images will also be embedded and indexed for retrieval.

Each chunk supports up to 10 image attachments (set via `SINGLE_CHUNK_ATTACHMENT_LIMIT`); images beyond this limit will not be extracted. The image size limit is governed by `ATTACHMENT_IMAGE_FILE_SIZE_LIMIT`.

The above extraction rule applies to:

* Images embedded in DOCX and XLSX files

  <Tip>
    Images embedded in other file types (e.g., PDF) can be extracted by using appropriate document extraction plugins in [knowledge pipelines](/en/self-host/use-dify/knowledge/knowledge-pipeline/readme).
  </Tip>

* Images referenced via accessible URLs using the following Markdown syntax in any file type:

  * `![alt text](image_url)`
  * `![alt text](image_url "optional title")`
