# get_image_str_from_content_part

> **Function** in `langchain_google_vertexai`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-vertexai/_image_utils/get_image_str_from_content_part)

Parses an image string from a dictionary with the correct format.

## Signature

```python
get_image_str_from_content_part(
    content_part: str | dict,
) -> str | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `content_part` | `str \| dict` | Yes | String or dictionary. |

## Returns

`str | None`

Image string if the dictionary has the correct format otherwise `None`.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/a3f016b2a6c4af535df275545f76fa7424aa39e5/libs/vertexai/langchain_google_vertexai/_image_utils.py#L291)