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

# getCardNetworkImage

> [!WARNING]
>
> This method is deprecated. Please use `getCardNetworkAsset(for:)`.

This method returns a card network image associated with a particular card network.

The SDK must be initialized before this method is called or an error will be thrown.

```swift SWIFT theme={"dark"}
static func getCardNetworkImage(for cardNetwork: CardNetwork) throws -> UIImage?
```

## Parameters

**Parameters**

**cardNetwork** `CardNetwork` *required*

**cases**

**CardNetwork.visa**

**CardNetwork.masterCard**

**CardNetwork.amex**

**CardNetwork.diners**

**CardNetwork.discover**

**CardNetwork.jcb**

**CardNetwork.unionpay**

**CardNetwork.maestro**

**CardNetwork.elo**

**CardNetwork.mir**

**CardNetwork.hiper**

**CardNetwork.hipercard**

**CardNetwork.unknown**

This network has a string value of 'OTHER' which matches what is returned by
Primer APIs when a network is not identifiable for a given card. Passing this
will return a generic card icon.

## Returns

**Returns**

**UIImage?**

A UIKit image that can be displayed to the user, or `nil` if no image is
available for the provided network, e.g. `nil` is returned for `.unknown`.

## Throws

**Throws**

**uninitializedSDKSession**

An error that will be thrown in case the SDK was not initialized properly. Before calling this method,
the SDK must be initialized.


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