The Gallery component displays a grid of images or videos with optional captions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/gradio-app/gradio/llms.txt
Use this file to discover all available pages before exploring further.
Basic usage
Constructor
List of images/videos or (media, caption) tuples
Image format for saving (e.g., “png”, “jpg”, “webp”)
Number of columns in grid
Number of rows to display
Component height with scrolling if needed
Whether images can be enlarged on click
If True, starts in preview mode
CSS object-fit property for thumbnails
Format for images passed to function
Events
- select - Triggered when image/video is selected
- upload - Triggered when media is uploaded
- change - Triggered when gallery changes
- delete - Triggered when item is deleted