<!--
{
  "availability" : [
    "LivePhotosKit JS: 1.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "LivePhotosKitJS",
  "identifier" : "/documentation/LivePhotosKitJS/LivePhotosKit.Player/photoSrc",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "LivePhotosKit JS"
    ],
    "preciseIdentifier" : "instp/LivePhotosKit.Player/photoSrc"
  },
  "title" : "photoSrc"
}
-->

# photoSrc

The source of the photo component of the Live Photo.

```
attribute String,ArrayBuffer photoSrc;
```

## Discussion

Set this property to three types of value:

- A String URL
- An `ArrayBuffer` instance that may already be available
- `null` (to clear the Player’s photo)

Changing this value causes the [`photo`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/photo) property (the image consumed by the Player for rendering) to be initially set to `null`. If the new value assigned is a string URL or an `ArrayBuffer`, a round of loading and decoding activity begins, eventually resulting in the [`photo`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/photo) property being populated with the newly loaded image. Only a string URL produces a network request as part of this loading process.

Changing this value while loading activity from a previous assignment is in progress causes the previous loading activity to abort.

Note: If, due to the architecture of your web app or web page, an already-loaded `Image` instance or fully painted canvas element is available, write it directly to the [`photo`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/photo) property instead.

Declarative markup attribute: `data-photo-src`

---

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)