<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHAssetResource/dataSize-5lxva",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "s:So15PHAssetResourceC6PhotosE8dataSizeSiSgvp"
  },
  "title" : "dataSize"
}
-->

# dataSize

The size of the resource in bytes

```
var dataSize: Int? { get }
```

## Discussion

The size may be unknown until a resource has finished being generated or processed, and some resources never report one. `nil` means the size is
unknown, not that it is zero.

---

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)