<!--
{
  "availability" : [
    "Swift: 6.3.0 -",
    "Xcode: 26.4.0 -",
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "swift: 6.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Testing",
  "identifier" : "/documentation/Testing/AttachableImageFormat/jpeg(withEncodingQuality:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Swift Testing",
      "Testing"
    ],
    "preciseIdentifier" : "s:7Testing21AttachableImageFormatV4jpeg19withEncodingQualityACSf_tFZ"
  },
  "title" : "jpeg(withEncodingQuality:)"
}
-->

# jpeg(withEncodingQuality:)

The JPEG image format.

```
static func jpeg(withEncodingQuality encodingQuality: Float) -> AttachableImageFormat
```

## Parameters

`encodingQuality`

The encoding quality to use when serializing an
image. A value of `0.0` indicates the lowest supported encoding
quality and a value of `1.0` indicates the highest supported encoding
quality.

## Return Value

An instance of this type representing the JPEG image format
with the specified encoding quality.

---

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)