GET /api/images/random
Returns a random image from the photo collection for slideshow display.Parameters
string
Specific folder path to get random image from. If not provided, selects from all images.
Request Examples
All Images
Specific Folder
Response
Response Fields
string
Server file path to the image
string
Original filename of the image
string
Folder path containing the image
string
Public URL path for accessing the image
object
Image metadata including size, dimensions, and modification date
Status Codes
Success
Random image retrieved successfully
Not Found
No images found in collection or specified folder
Server Error
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)

