Lorem Picsum branded as Lorem Ipsum for photos offers API for retrieving random photos.
The usage is fairly simple, one only have to access the API URL, for example to retrieve a 300×200 random photo, one just need to access this url:
https://picsum.photos/300/200/?random
Visit Lorem Picsum website for more API parameters.