---
title: OPTIMIZED_EXTERNAL_IMAGE_REQUEST_INVALID
product: vercel
url: /docs/errors/OPTIMIZED_EXTERNAL_IMAGE_REQUEST_INVALID
type: reference
prerequisites:
  []
related:
  []
summary: The external image request is invalid. This is a request error.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# OPTIMIZED_EXTERNAL_IMAGE_REQUEST_INVALID

The `OPTIMIZED_EXTERNAL_IMAGE_REQUEST_INVALID` error occurs when the external image request is invalid.

**Error Code:** `502`

**Name:** Bad Gateway

## Troubleshoot

To troubleshoot this error, follow these steps:

1. **Verify external URL:** Ensure that the external image URL is absolute and correctly formatted
2. **Check query parameters:** Ensure that any query parameters are valid
3. **Validate source configuration:** Verify that the external source is configured correctly and accessible


---

[View full sitemap](/docs/sitemap)
