The simplest thing would be just nginx, it can serve random files from a folder http://nginx.org/en/docs/http/ngx_http_random_index_module.html And apparently it can also resize images on the fly https://zaiste.net/network/nginx/howtos/howto-resize-on-the-fly-cache-images-nginx/ Answer from aspirat2110 on reddit.com
🌐
Reddit
reddit.com › r/learnpython › looking for an api to get random pictures
r/learnpython on Reddit: Looking for an API to get random pictures
April 26, 2025 -

Hey everyone,
I'm currently working on a little project and I’m looking for an API that provides random pictures. Ideally, it would be free (or have a generous free tier), and it doesn’t matter too much what kind of pictures – landscapes, abstract, animals, anything works.
Any recommendations would be super appreciated. Thanks in advance!

🌐
API Ninjas
api-ninjas.com › api › randomimage
Random Image API - API Ninjas
https://api.api-ninjas.com/v1/randomimage · Headers · X-Api-KeyLog in or sign up to get your API Key · Send Request · IMAGE · cURL · Python · JavaScript · 1 2 3 curl -X GET "https://api.api-ninjas.com/v1/randomimage?category=wildlife" \ -H "X-Api-Key: YOUR_API_KEY" \ --output random_image.jpg ·
🌐
Nekosapi
nekosapi.com › docs › images › random
Get Random Images – Nekos API
Python 3JavaScript · random_images.py · import requests res = requests.get("https://api.nekosapi.com/v4/images/random") res.raise_for_status() data = res.json() Get an Image by IDGet a Random Image File · Nyeki.pyNekos.LandNekoSauceGitHub RepoStatusDiscordDonateDMCA ·
🌐
MakeUseOf
makeuseof.com › home › programming › build a random image fetcher using python
Build a Random Image Fetcher Using Python
February 23, 2023 - Import the modules and define a function named img_requests() that takes txt as an input parameter. Send a GET method to Unsplash's API URL and use the format method to fill in the placeholder, {0}, ...
🌐
Okzest
okzest.com › blog › api-random-images
API Random Images a Guide to Dynamic Visuals - OKZest
From here, you could easily adapt it to save the image to a file, store the URL in a database, or pass it along to another microservice. ... def get_random_image_url(): """ Fetches a random image URL from the OKZest API.
🌐
Reddit
reddit.com › r/selfhosted › what's the simplest way to create an api that serves one random image from a requested folder? (basically a glorified photo frame, by request)
r/selfhosted on Reddit: What's the simplest way to create an API that serves one random image from a requested folder? (basically a glorified photo frame, by request)
February 16, 2024 -

I'm not a coder, but I can understand code. I want to create an API for an Inky Frame, to be able to quickly add/ remove photos from the random carousel.

On the Inky Frame side, there are already examples that I can use to connect and get a photo from an API.

I'm missing the server part... has any one of you done something similar? Is there any easy way of coding this/ maintaining it? (bonus question, if the approach also allows for re-sizing the images before it sends them over to the Inky Frame for that extra automation juice)

Thank you!!

🌐
Unsplash
unsplash.com › developers
Unsplash Image API | Free HD Photo API
Every image URL returned by the API can easily be manipulated to dynamically adjust the dimensions, crop, and quality of the image in realtime. ... We maintain official libraries in JavaScript, PHP, and Ruby. Our community have also built popular libraries in Go, Python, Swift, and more.
🌐
GitHub
github.com › maximtrp › randpaper
GitHub - maximtrp/randpaper: Random Photo from Pexels :city_sunset:
randpaper is a Python script to download photos tagged with a specified keyword (or a random one from the predefined list) from Pexels website. To use it you must obtain an API KEY from Pexels.
Author   maximtrp
Find elsewhere
🌐
Responsiveimages
random.responsiveimages.io
Random Image API
A simple API for serving random images.
🌐
Stack Overflow
stackoverflow.com › questions › 67124598 › how-can-i-get-a-random-image-from-image-search-using-a-command-discord-py
python - How can I get a random image from image search using a command discord.py - Stack Overflow
April 16, 2021 - You can use the Unsplash Source API, as suggested by Bagle. @command(name = "img") async def cat(self, ctx, arg): embed = discord.Embed( title = 'Random Image 🐈', description = 'Random', colour = discord.Colour.purple() ) embed.set_image...
🌐
Sciencetony
sciencetony.com › 2019 › 07 › random-images-from-api-with-python.html
Random Images from API with python
July 5, 2019 - The API I am using is a publicly available web-based API , which returns data as in JSON or XML. In other words, I send a message to a stated website and request some data, in this case images are then returned to me. Using python 2 is a little different in the coding. It is worth noting that the ['file'] at the end of json.loads() may be different in the website you are connecting to. I connected to randomcat.com.
🌐
Pysio's Home
pysio.online › en › posts › develop › randomimage.html
Random Image API | Pysio's Home
June 1, 2025 - This site now provides a random image API. You can directly use the URL below to get a random image
🌐
PyPI
pypi.org › project › random-cat
random-cat · PyPI
# random-cat random-cat is a amazing modul to get cat images. This Project won't be posible without the great Cat API (http://thecatapi.com). ## Big Thanks to the great Cat API Go and visit [http://thecatapi.com](http://thecatapi.com) ![alt text](http://thecatapi.com/api/images/get?type=gif "See? amazing!") **Python 2 and 3 compatible** ## Installation Install through **pip**. ``` $ pip install random-cat ``` or get from source ``` $ git clone https://github.com/gravmatt/random-cat $ cd random-cat $ python setup.py install ``` ## Usage The cat module has just one function **getCat()** with three optional arguments.
      » pip install random-cat
    
Published   Mar 03, 2016
Version   1.0.1
🌐
Reddit
reddit.com › r/a:t5_62dkfw › python code snippet to get a random image
r/a:t5_62dkfw on Reddit: python code snippet to get a random image
March 27, 2022 -

here i used the unsplash API to get a random image and then save it to the system

from urllib.request import urlopen
from PIL import Image

img = Image.open(urlopen('https://source.unsplash.com/random'))
img.save('image.png')
🌐
GitHub
gist.github.com › c6bff470e84912566113
[python] random image generator · GitHub
Doesn't work :/ P. S. I've replaced module Image with image from pip. ... It works, but you need at least 3 parameters while calling the python file. Like this: random_image_generator.py 20 20 100 I also changed 'RGBA' to 'RGB'. RGBA will cause an IOError. The Image package should be imported from PIL , not directly.
🌐
GitHub
github.com › topics › random-images
random-images · GitHub Topics · GitHub
news qrcode discord-bot python3 wikipedia-bot guessing-game random-text currency-converter qrcode-generator guess-the-number random-number pytnon guess-number-game random-images rock-paper-scissors-game qrcode-bot ... The best npm package for fetching random animal images, such as cats, foxes, dogs, and more! 😻🦊🐕 · cats api image images random birds dogs foxes alpacas random-images fishes skiffy
🌐
GitHub
github.com › manelmadeira › random-reddit-pic
GitHub - manelmadeira/random-reddit-pic: Random Reddit Picture API
November 21, 2016 - Get random image from configured Reddit channels powered by MongoDB and Python Flask.
Author   manelmadeira
🌐
Lorem Picsum
picsum.photos
Lorem Picsum
<img src="https://picsum.photos/200/300?random=1"> <img src="https://picsum.photos/200/300?random=2"> If you need a file ending, you can add .jpg to the end of the url. ... To get an image in the WebP format, you can add .webp to the end of the url. ... Get a list of images by using the /v2/list endpoint. ... The API will return 30 items per page by default.
🌐
Docsfold
docsfold.com › blog › 5-image-generation-apis-you-can-use
5 Image Generation APIs You Can Use in 2024 | Docsfold
May 3, 2024 - Lorem Picsum is a free image generation API that allows you to generate random images with custom dimensions and filters.
🌐
PyPI
pypi.org › project › randimage
Client Challenge
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser