<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPThumbnailImage/maximumImageSize(forAspectRatio:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPThumbnailImage(cm)maximumImageSizeForAspectRatio:"
  },
  "title" : "maximumImageSize(forAspectRatio:)"
}
-->

# maximumImageSize(forAspectRatio:)

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

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

## Parameters

`aspectRatio`

The width-to-height ratio of the image.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)