Skip to content

Conversation

MikaelAmborn
Copy link

What

Add support for generating thumbnails during photo capture with an asynchronous callback that fires before the full photo is saved. This enables fast preview functionality without loading the full image.

Changes

  • Add thumbnailSize and onThumbnailReady options to TakePhotoOptions
  • Add ThumbnailFile type for thumbnail metadata
  • iOS: Extract embedded thumbnail from AVCapturePhoto using ImageIO
  • Android: Implement memory-efficient downsampling with hardware-accelerated decoding
  • Add event bridge onThumbnailReady for both platforms
  • Update documentation with usage examples and platform implementation details
  • Add thumbnail display in example app

Platform implementations

  • iOS: Uses embedded thumbnail from camera capture if available
  • Android: Uses BitmapFactory.Options.inSampleSize for efficient downsampling without loading full image into memory

Both implementations are asynchronous and non-blocking.

Disclaimer: I'm not an iOS or Android developer but have relied on Cursor to implement this.

Tested on

iPhone 14, iOS 18.6.2
Android implementation compiles successfully (needs device testing)

Add support for generating thumbnails during photo capture with an
asynchronous callback that fires before the full photo is saved. This
enables instant preview functionality and better UX in camera
applications.

**Changes:**
- Add `thumbnailSize` and `onThumbnailReady` options to
  `TakePhotoOptions`
- Add `ThumbnailFile` type for thumbnail metadata
- iOS: Extract embedded thumbnail from AVCapturePhoto using ImageIO for
  maximum performance
- Android: Implement memory-efficient downsampling with
  hardware-accelerated decoding
- Add event bridge `onThumbnailReady` for both platforms
- Update documentation with usage examples and platform implementation
  details
- Add thumbnail display in example app

**Platform implementations:**
- iOS: Uses embedded thumbnail from camera capture if available
- Android: Uses BitmapFactory.Options.inSampleSize for efficient
  downsampling without loading full image into memory

Both implementations are asynchronous and non-blocking.

Tested on iPhone 14, iOS 18.6.2
Android implementation compiles successfully (needs device testing)
Copy link

vercel bot commented Oct 14, 2025

@MikaelAmborn is attempting to deploy a commit to the mrousavy's Team Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant