> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-en/action-guide/image-search/image-exists.md).

# Image exists

This action helps the tool to quickly "glance" once to see if the target image is displayed on the screen. The result returned immediately is True (if found) or False (if not found).

* Difference: Unlike `Wait to image` (waiting), this action does not stop to wait but only scans once at the time of execution.
* Effect: Very suitable to combine with conditional command blocks (`If`, `Else if`), helping the script to make smart decisions immediately (for example: if an advertisement pop-up is detected, close it; if not, proceed to the next step).

🎥 Watch the tutorial video: [Here](https://youtu.be/xWu0g35YTGo).

> ⚠️ Special note about Scale ratio: The percentage scale of the screen and the resolution of the browser when you take the sample image must be exactly the same as when the script runs in practice. If when taking the sample image you set the display to 100%, but when running the profile the system automatically opens at a scale of 80% or 125%, the image scanning algorithm will not be able to recognize the pixel structure of the target and will lead to incorrect results.

#### Practical example: Check and close unexpected advertisement notifications (Popup)

When you browse a website, sometimes advertisement windows or unexpected survey notifications pop up, obscuring the screen. If there is an advertisement, the script needs to click the "X" button to close it before continuing; if not, the script will skip the closing step to avoid wasting time.

* Configuration method: You take a small sample image of the "X" button to close the advertisement for the system to recognize.
* Result: The system will scan the screen at that moment. If the "X" button appears, the output variable will receive the value `True`. You just need to combine it with the If conditional command block (If variable = `True`) to call the Mouse click action at that position to clear the screen before proceeding.

> 💡 *Detailed parameters such as sample image area configuration (Image), color deviation (Threshold), True color, and output variable (Output) will be analyzed in depth in the guide to combine the trio of actions: Wait to image, Image exists, and Image search.*


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gpmautomate.com/automate-en/action-guide/image-search/image-exists.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
