# IComputeResource.WithImagePushOptions

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Defined on: [IComputeResource](/reference/api/go/aspire.hosting/icomputeresource.md)
- Version: `17.0.0`
- Kind: `method`

Adds an asynchronous callback to configure container image push options for the resource.

## Remarks

This method allows customization of how container images are named and tagged when pushed to a registry using an asynchronous callback.
Use this overload when the callback needs to perform asynchronous operations such as retrieving configuration values from external sources.
The callback receives a `ContainerImagePushOptionsCallbackContext` that provides access to the resource
and the `ContainerImagePushOptions` that can be modified.
Multiple callbacks can be registered on the same resource, and they will be invoked in the order they were added.

## Definition

```go
type IComputeResource interface {
    // ... omitted for brevity
    WithImagePushOptions(callback func(arg ContainerImagePushOptionsCallbackContext)) IComputeResource
}
```

## Signature

```go
WithImagePushOptions(callback func(arg ContainerImagePushOptionsCallbackContext)) IComputeResource
```

## Parameters

- `callback` (`func(arg ContainerImagePushOptionsCallbackContext)`) -- The asynchronous callback to configure push options.

## Returns

[`IComputeResource`](/reference/api/go/aspire.hosting/icomputeresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [IComputeResource](/reference/api/go/aspire.hosting/icomputeresource.md) -- `handle`
