> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/zh-tw/zhi-shi-ku/088-including-images-on-overleaf.md).

# 在 Overleaf 中插入圖片

在 Overleaf 上編輯文件時，加入圖片非常簡單。本文說明如何從電腦或網址將圖片上傳到您的專案，以及如何將它們包含在排版文件中。

## 簡單圖片上傳

|                                                                                             |                                                                        |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| 要上傳圖片，請在編輯器中前往左上角並點擊上傳圖示 ![Uploadicon.png](/files/dc1c47e8547cde306f317aa8aab1e6a10e79a630) | ![V2uploadbutton.png](/files/ccc76b5778d3af0febf61ba082c5c959fb9576ed) |

|                  |                                                                          |
| ---------------- | ------------------------------------------------------------------------ |
| 將會跳出一個對話框，讓您上傳檔案 | ![V2uploaddialogue.png](/files/226c072d9ec63c5f12fb6004702ea5aceeb1bc2f) |

|                                    |                                                                            |
| ---------------------------------- | -------------------------------------------------------------------------- |
| 您可以在那裡拖放檔案，或點擊 ***選擇檔案*** 以開啟檔案瀏覽器 | ![UploadingImagesEx3.png](/files/3a4acf3fe3d18dd87aa7e4b75560ed6e143d2628) |

|                                                        |                                                                             |
| ------------------------------------------------------ | --------------------------------------------------------------------------- |
| 瀏覽到正確的資料夾並選擇要上傳的圖片。您可以一次上傳多個檔案。上傳程序完成後，您會在左側面板中看到這些檔案。 | ![UploadingImagesEx3b.png](/files/776ef2f3c17a49bfee0836434d5687e47f1c0698) |

現在您可以在 LaTeX 檔案中使用圖片，請參見下方範例

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\title{含圖片的專案}
\author{Overleaf}
\date{}

\begin{document}

\maketitle

\section{簡介}
\begin{figure}[htp]
    \centering
    \includegraphics[width=4cm]{InsertingImagesEx5}
    \caption{一張星系圖片}
    \label{fig:galaxy}
\end{figure}

\end{document}
```

![UploadingImagesEx5b.png](/files/cecb82798289089273e8014efc37f800d43c84c3)

請注意，只有圖片的檔名會作為參數傳入 `\includegraphics[width=4cm]{lion-logo}`

如需更多關於 LaTeX 中圖片處理的資訊，請參閱 [延伸閱讀](#further-reading) 以取得其他文件頁面的連結。

## 將圖片上傳到資料夾

如果您的專案包含多張圖片，您可能需要將它們放在獨立的資料夾中，以維持整體井然有序。

|                                                                                                         |                                                                             |
| ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| 要在 Overleaf 中建立資料夾，請前往編輯器左上角並點擊資料夾圖示 ![Foldericon.png](/files/6f10b589b9df77783f75f3ad73f10a8af83b34da) | ![UploadingImagesEx6b.png](/files/2ed0cf65a44b47bd266196ae90a478be0cf31de6) |

|                                   |                                                                             |
| --------------------------------- | --------------------------------------------------------------------------- |
| 會出現一個輸入框，為您的資料夾設定名稱，然後點擊 ***建立*** | ![UploadingImagesEx7b.png](/files/dd8f92cdc90319d43b82d5718bfaa5db6734019c) |

|                                                   |                                                                             |
| ------------------------------------------------- | --------------------------------------------------------------------------- |
| 現在您可以在左側面板中看到該資料夾。您可以拖放已上傳的檔案，甚至可以在左側面板中的資料夾之間拖放。 | ![UploadingImagesEx8b.png](/files/15de14dd41aa9fab27670a581a3768012f0a2969) |

要直接將檔案上傳到資料夾，請點擊該資料夾，然後點擊 ***新增*** 並依照其中的說明 [上一節](#simple-image-upload).

當您的資料夾中已有一些檔案時，就可以在文件中使用它們，請參見下方範例。

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\title{含圖片的專案}
\author{Overleaf}
\date{}

\graphicspath{{Images/}}

\begin{document}

\maketitle

\section{簡介}
\begin{figure}[htp]
    \centering
    \includegraphics[width=4cm]{InsertingImagesEx5}
    \caption{一張星系圖片}
    \label{fig:galaxy}
\end{figure}

\end{document}
```

![UploadingImagesEx5b.png](/files/cecb82798289089273e8014efc37f800d43c84c3)

命令 `\graphicspath{ {Images/} }` 告訴 LaTeX 這些圖片存放於 *圖片*，現在您只需使用檔名，而不是完整路徑 `\includegraphics`

如需更多關於 LaTeX 中圖片管理的資訊，請查看 [延伸閱讀](#further-reading) 以取得連結。

## 快速指南

* **將一張或多張圖片上傳到您的 Overleaf 專案的快速指南：**

在編輯器左上角點擊上傳圖示，然後您可以拖放檔案，或點擊「選擇檔案」以瀏覽本機目錄。上傳程序完成後，您就可以在文件中使用這些圖片。

* **將圖片上傳到資料夾的快速指南：**

要在編輯器中建立新資料夾，請點擊資料夾圖示，為您的資料夾設定名稱，然後點擊建立。現在點擊您新建立的資料夾，並依照上一段所述的流程上傳圖片，或將已上傳的圖片拖放到您的資料夾中。

## 延伸閱讀

如需進一步了解 LaTeX 中的圖片處理，請參閱。

* [插入圖片](/latex/zh-tw/geng-duo-zhu-ti/27-inserting-images.md)
* [圖片與表格的定位](/latex/zh-tw/tu-biao-yu-biao-ge/02-positioning-images-and-tables.md)
* [表格與圖形清單](/latex/zh-tw/tu-biao-yu-biao-ge/03-lists-of-tables-and-figures.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/zh-tw/zhi-shi-ku/088-including-images-on-overleaf.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
