A dead simple random image API for web pages. Images curated by the magnificent ones at Simple Desktops. πππ
Simple Desktops is ...
A collection of wallpapers designed to make your computer beautiful without distraction.
Personally, I really like the design and simplicity of the images Simple Desktops provide. So I really wanted to put those on my blog, or other web pages. So I whipped up this API to randomize an image that I can easily embed in my blog posts.
Embed the following code into your desired places. Don't worry about https
support, API's GET
method is served over https
, and all redirected image links are served over https
too. π±βπ€
1. Plain URL
https://api.spencerwoo.com
2. Markdown
![img](https://api.spencerwoo.com)
3. HTML
<img src="https://api.spencerwoo.com" alt="img.png" title="img.png" />
Images are reloaded and randomized with every refresh.
Websites using Spencer's Simple-Desktop-API:
If you are using my API and wish to be added to the list, fork the project, add yourself to the list here, and make a PR. Cheers. π
.
βββ README.md
βββ api.php
βββ assets
β βββ archlogo.png
β βββ imageToBeUploadedToSmms.png
βββ index.php
βββ simple-desktops.py
βββ simple-desktops.txt
1 directory, 7 files
simple-desktops.py
is for scraping down images at Simple Desktops. Images are downloaded to assets/imageToBeUploadedToSmms.png
and then uploaded to SM.MS image hosting service. The response image url is stored at simple-desktops.txt
.
If you consider serving this at your own server, put all files above at your server's web root. Then go for $YourServerIP/api$
and see that in action. π
Contributions are welcome.
- Images at Simple Desktops are for personal use and for personal use only. They shouldn't be sold or reposted without the expressed written consent of the desktop creator. See Simple Desktops for more details.
- A huge thank you to SM.MS for providing such a stable and awesome image hosting service.
- Server provided by VULTR - The Infrastructure Cloudβ’.
This project is published under the MIT License.
Β© Spencer Woo