戴兜

戴兜的小屋

Coding the world.
github
bilibili
twitter

Placeholder Image Generation API (DouAPI)

Placeholder Image.png

Introduction to DouAPI#

DouAPI is a service provided by Dai Dou since the end of 2015. According to Uptimerobot's monitoring data, the availability rate has been above 90% for about 3 years. It can be said that DouAPI is the most dedicated project maintained by Dai Dou. During the winter vacation, DouAPI was rewritten in NodeJS, and several basic interfaces have been remade. Development is still ongoing.

What is a Placeholder Image#

When we are laying out web pages, sometimes we need to place some placeholder images to temporarily fill in the gaps. It can be quite cumbersome to manually generate these placeholder images, especially when the dimensions need to be precise to the pixel. The placeholder image generation interface provided by Dai Dou can easily solve this problem.

How to Use#

Currently, Dai Dou's website is fully HTTPS, and so is DouAPI. You can only make API requests through HTTPS.

API URL: https://api.daidr.me/apis/imgholder/[size](.[image format])?text=[custom text]&bg=[background color]&fg=[foreground color]

Simple examples:

https://api.daidr.me/apis/imgholder/100x100

https://api.daidr.me/apis/imgholder/100x100.png

https://api.daidr.me/apis/imgholder/100x100?text=custom

https://api.daidr.me/apis/imgholder/100x100?bg=a0dad0&fg=709891

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.