View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Videos

Open Menu Close Menu
  • Collections
  • All Videos
  • About

Back to WWDC26

  • About
  • Summary
  • Code
  • Create high quality images using Image Playground

    Enable high-quality image creation in your app using Image Playground. With a new generative model that runs on Private Cloud Compute, users can make images in virtually any style, including photorealistic, in your app. You can also specify dimensions for use in even more places, and allow people to modify images using natural language descriptions and touch. Explore how to adopt Image Playground, generate images from descriptions and photos, and manage feature availability in your app.

    Chapters

    • 0:00 - Introduction
    • 2:03 - Capabilities
    • 5:02 - Adopt Image Playground
    • 8:29 - Options
    • 12:15 - Availability

    Resources

      • HD Video
      • SD Video

    Related Videos

    WWDC26

    • Build with the new Apple Foundation Model on Private Cloud Compute
    • Read between the strokes with PencilKit

    WWDC24

    • Bring expression to your app with Genmoji
  • Search this video…
    • 5:28 - Adopt Image Playground in SwiftUI

      // Adopt Image Playground in SwiftUI
      
      func imagePlaygroundSheet(
          isPresented: Binding<Bool>,
          concepts: [ImagePlaygroundConcept] = [],
          sourceImage: Image? = nil,
          onCompletion: @escaping (URL) -> Void,
          onCancellation: (() -> Void)? = nil
      ) -> some View
    • 5:39 - Add Image Playground sheet with binding to @State

      // Adopt Image Playground
      
      @State private var showingPlayground = false
      
      var body: some View {
          Button("Create image") {
              showingPlayground = true
          }
          .imagePlaygroundSheet(
              isPresented: $showingPlayground,
              onCompletion: { url in
                  var updated = currentCard
                  store.saveImage(url, for: &updated)
              }
          )
      }
    • 6:29 - Seeding the sheet with context from your card

      // Seeding the sheet with context from your card
      
      var concepts: [ImagePlaygroundConcept] {
          [
              .text(card.theme),
              .extracted(from: card.message, title: card.theme),
          ]
      }
      
      var body: some View {
          Button("Create image") {
              showingPlayground = true
          }
          .imagePlaygroundSheet(
              isPresented: $showingPlayground,
              concepts: concepts,
              onCompletion: { url in
                  var updated = card
                  store.saveImage(url, for: &updated)
              }
          )
      }
    • 7:11 - Starting from a reference photo

      // Starting from a reference photo
      
      @State private var sourceImage: Image?
      
      var body: some View {
          Button("Create image") {
              showingPlayground = true
          }
          .imagePlaygroundSheet(
              isPresented: $showingPlayground,
              concepts: concepts,
              sourceImage: sourceImage,
              onCompletion: { url in
                  var updated = card
                  store.saveImage(url, for: &updated)
              }
          )
      }
    • 7:42 - Providing a visual suggestion using a drawing

      // Providing a visual suggestion using a drawing
      
      @State private var drawing = PKDrawing()
      
      var concepts: [ImagePlaygroundConcept] {
          var result: [ImagePlaygroundConcept] = [
              .text(card.theme),
              .extracted(from: card.message)
          ]
          if !drawing.strokes.isEmpty {
              result.append(.drawing(drawing))
          }
          return result
      }
    • 8:06 - Adopt Image Playground in UIKit or AppKit

      // Adopt Image Playground in UIKit or AppKit
      
      func presentViewController() {
          let viewController = ImagePlaygroundViewController()
          viewController.concepts = [
              .text(card.theme),
              .extracted(from: card.message)
          ]
          viewController.delegate = self
          present(viewController, animated: true)
      }
      
      func imagePlaygroundViewController(
          _ viewController: ImagePlaygroundViewController,
          didCreateImageAt url: URL
      ) {
          var updated = card
          store.saveImage(url, for: &updated)
          dismiss(animated: true)
      }
    • 9:02 - Size Specification

      // Size Specification
      
      var options: ImagePlaygroundOptions {
          var options = ImagePlaygroundOptions()
          options.sizeSpecification = .closest(to: card.format.size)
          return options
      }
      
      var body: some View {
          Button("Create image") { showingPlayground = true }
              .imagePlaygroundSheet(
                  isPresented: $showingPlayground,
                  concepts: concepts,
                  onCompletion: { url in
                      var updated = card
                      store.saveImage(url, for: &updated)
                  }
              )
              .imagePlaygroundOptions(options)
      }
    • 9:39 - Styles

      // Styles
      
      var options: ImagePlaygroundOptions {
          var options = ImagePlaygroundOptions()
          options.sizeSpecification = .closest(to: card.format.size)
          return options
      }
      
      var body: some View {
          Button("Create image") { showingPlayground = true }
              .imagePlaygroundSheet(
                  isPresented: $showingPlayground,
                  concepts: concepts,
                  onCompletion: { url in
                      var updated = card
                      store.saveImage(url, for: &updated)
                  }
              )
              .imagePlaygroundOptions(options)
              .imagePlaygroundGenerationStyle(
                  pendingStylePreset.defaultStyle,
                  in: pendingStylePreset.allowedStyles
              )
      }
    • 10:27 - External Provider Style

      // External Provider Style
      
      var options: ImagePlaygroundOptions {
          var options = ImagePlaygroundOptions()
          options.sizeSpecification = .closest(to: card.format.size)
          return options
      }
      
      var body: some View {
          Button("Create image") { showingPlayground = true }
              .imagePlaygroundSheet(
                  isPresented: $showingPlayground,
                  concepts: concepts,
                  onCompletion: { url in
                      var updated = card
                      store.saveImage(url, for: &updated)
                  }
              )
              .imagePlaygroundOptions(options)
              .imagePlaygroundGenerationStyle(
                  pendingStylePreset.defaultStyle,
                  in: pendingStylePreset.allowedStyles + [.externalProvider]
              )
      }
    • 11:02 - Generating an expressive icon for the card thumbnail

      // Generating an expressive icon for the card thumbnail
      
      @State private var showingIconPlayground = false
      
      var body: some View {
          Button("Create icon") {
              showingIconPlayground = true
          }
          Color.clear
              .imagePlaygroundSheet(
                  isPresented: $showingIconPlayground,
                  concepts: concepts,
                  onCompletion: { _ in
                  } ,
                  onAdaptiveImageGlyphCreation: { glyph in
                      var updatedCard = card
                      store.saveIcon(glyph, for: &updatedCard)
                  }
              )
              .imagePlaygroundGenerationStyle(.emoji, in: [.emoji])
      }
    • 12:01 - Disabling personalization when it doesn't fit your context

      // Disabling personalization when it doesn't fit your context
      
      var options: ImagePlaygroundOptions {
          var options = ImagePlaygroundOptions()
          options.sizeSpecification = .closest(to: card.format.size)
          options.personalization = .disabled
          return options
      }
    • 12:32 - Supports image generation

      // Supports image generation
      
      @Environment(\.supportsImageGeneration)
      private var supportsImageGeneration
      
      var body: some View {
          NavigationLink(card.recipient) {
              if supportsImageGeneration {
                  CardEditorView(card: card)
              }γelse {
                  CardPickerView(card: card)
              }
          }
      }
    • 0:00 - Introduction
    • The ImagePlayground framework brings high-quality, true-to-life image creation into your app, on devices with Apple Intelligence support.

    • 2:03 - Capabilities
    • Image Playground enables the creation of high-quality images with people, styles, and different aspect ratios.

    • 5:02 - Adopt Image Playground
    • Present the Image Playground sheet and seed it with context from your app.

    • 8:29 - Options
    • Configure the Image Playground sheet with options like size, style, and personalization.

    • 12:15 - Availability
    • Ensure your app gracefully handles both supported and unsupported devices, presenting the full Image Playground experience when available.

Developer Footer

  • Videos
  • WWDC26
  • Create high quality images using Image Playground
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines