maui-media-picker

Pick or capture photos and videos in .NET MAUI apps with permission handling.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/snailb1007/snail-codex-skills --skill maui-media-picker-snailb1007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-media-picker
Source: https://github.com/snailb1007/snail-codex-skills/tree/main/skills/maui-media-picker
Command: npx skills add https://github.com/snailb1007/snail-codex-skills --skill maui-media-picker-snailb1007

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Simplify selecting photos and videos from device gallery or camera in .NET MAUI apps, with proper permission handling and FileResult processing.

Core Features & Use Cases

  • Single- and multi-select media using MediaPicker APIs (PickPhotoAsync, PickPhotosAsync, PickVideoAsync, PickVideosAsync).
  • Camera capture support (CapturePhotoAsync, CaptureVideoAsync) with permission checks and UI-thread requirements.
  • Configurable options via MediaPickerOptions (SelectionLimit, MaximumWidth, MaximumHeight, CompressionQuality, RotateImage, PreserveMetaData).
  • Clear guidance on platform-specific considerations and common pitfalls.

Quick Start

Invoke MediaPicker.Default to pick or capture media on the UI thread and handle the returned FileResult.

Frequently Asked Questions about maui-media-picker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pick photos and videos in .NET MAUI with proper permissions?

To pick photos and videos in .NET MAUI, invoke MediaPicker.Default APIs like PickPhotosAsync on the UI thread. This handles permissions automatically and returns a FileResult for accessing the selected media files.

Can I capture photos directly from the camera in a .NET MAUI app?

Yes, you can capture photos in a .NET MAUI app using CapturePhotoAsync. It enforces UI thread execution and handles necessary device permission checks before returning the captured media as a FileResult.

Does .NET MAUI MediaPicker support multi-select for gallery photos?

Yes, .NET MAUI MediaPicker supports multi-select via PickPhotosAsync. You can configure the selection limit and other media options like MaximumWidth and CompressionQuality using MediaPickerOptions.

How do I compress and resize photos picked with .NET MAUI MediaPicker?

You compress and resize photos picked with .NET MAUI MediaPicker by passing MediaPickerOptions. Configure MaximumWidth, MaximumHeight, and CompressionQuality parameters to alter the returned FileResult.

Why does my MAUI media picker code throw an exception when selecting files?

MAUI media picker code throws exceptions if invoked off the UI thread or when device permissions are missing. Always execute PickPhotoAsync or CaptureVideoAsync on the main thread and ensure permissions are granted.