# Auto Triggering OG Image Update

There are times you need to update something that will directly effect the generated open graph image. For an example you have a post where you are adding the post title to the OG image. When the title gets updated, you will want the OG image to be updated as well.\
\
To automatically trigger the update of OG images on such occasions, you may add a property to your model as below.

```php
protected array $graphify_fields = [
    'title',
];
```

This will auto update the OG image  when the title of the model is updated.


---

# Agent Instructions: 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:

```
GET https://ibnnajjaar.gitbook.io/graphify/advanced-usage/auto-triggering-og-image-update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
