> ## Documentation Index
> Fetch the complete documentation index at: https://namespace.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# devbox image optimize

> Optimize a Devbox base image for a site.

Optimize a registered Linux base image for a Namespace site. Without `--name` or `--site`, the CLI prompts you to select the missing values.

## Usage

```bash theme={null}
devbox image optimize [flags]
```

## Examples

### Optimize an image for a site

```bash theme={null}
devbox image optimize --name my-team/golang --site iad
```

## Options

**--all\_images** `boolean` (default: false)

Include every image version in the interactive picker instead of only the latest version in each repository.

**--name** `string`

Optimize an image repository directly and skip interactive image selection. If multiple versions exist, the newest matching image is selected.

**--site** `string`

Set the target site, such as `ord`, `iad`, or `zrh`, and skip interactive site selection.

## Related topics

> [card] [devbox image list](https://namespace.so/docs/reference/devbox-cli/image-list.md)
>
> Find available image names.

> [card] [devbox image build](https://namespace.so/docs/reference/devbox-cli/image-build.md)
>
> Build and optimize an image in one command.

> [card] [Custom images](https://namespace.so/docs/devbox/images.md)
>
> Learn how image optimization fits the image workflow.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.