GET /api/images/random
Returns a random image from the photo collection for slideshow display.Parameters
Specific folder path to get random image from. If not provided, selects from all images.
Request Examples
All Images
Specific Folder
Response
Response Fields
Server file path to the image
Original filename of the image
Folder path containing the image
Public URL path for accessing the image
Image metadata including size, dimensions, and modification date
Status Codes
Random image retrieved successfully
No images found in collection or specified folder
Error accessing file system or processing images
Usage in Slideshow
Folder Filtering
When using thefolder parameter:
- Use forward slashes for nested folders:
vacation/2023/summer - Folder paths are relative to the uploads directory
- Invalid folder paths return no results
- Empty folders return no results
Image Formats
Supported formats:- JPEG (.jpg, .jpeg)
- PNG (.png)
- GIF (.gif)
- WebP (.webp)

