Image Place Holder Api

Nov 30, 2024

Placeholder Image API: Create Custom Placeholder Images Easily

Hello. this is my first true blog, had no idea, So i made a simple free api for web devs! This api allows people to make placeholder images on the go, rather than finding on internet. Fun fact:- I took more time in writing this blog than actually writing that api.

The API is accessible at:

https://tushitgarg.com/imageapi

How It Works

The API generates placeholder images based on the query parameters you provide in the URL. Below are the properties you can use to customize your images.


Supported Query Parameters

title (Optional)

  • Description: Sets the text to display on the image.
  • Default: "Your text"
  • Example: /imageapi?title=Hello+World

width (Optional)

  • Description: Specifies the width of the image in pixels.
  • Default: 1024
  • Example: /imageapi?width=800

height (Optional)

  • Description: Specifies the height of the image in pixels.
  • Default: 1024
  • Example: /imageapi?height=600

color (Optional)

  • Description: Sets the text color.
  • Default: "white"
  • Example: /imageapi?color=red

bgcolor (Optional)

  • Description: Sets the background color of the image.
  • Default: "black"
  • Example: /imageapi?bgcolor=blue

font (Optional)

  • Description: Sets the font size of the text in pixels.
  • Default: 100
  • Example: /imageapi?font=150

Example Usage (Optional)

  • Query: /imageapi?title="hello+world"&font=150
  • Result: enter image description here
Tushit Garg