---
title: "maximumImageSize(forAspectRatio:)"
framework: carplay
role: symbol
role_heading: Type Method
path: "carplay/cpthumbnailimage/maximumimagesize(foraspectratio:)"
---

# maximumImageSize(forAspectRatio:)

Returns the recommended maximum image size for a @c CPThumbnailImage with the given aspect ratio.

## Declaration

```swift
class func maximumImageSize(forAspectRatio aspectRatio: CGFloat) -> CGSize
```

## Parameters

- `aspectRatio`: The width-to-height ratio of the image.

## Return Value

Return Value The recommended @c CGSize at which to size the image.

## Discussion

Discussion Use this method to determine the correct size for images before providing them to oversized images being held in the thumbnail pipeline.
