/placeholder-api

Simple API to generate placeholder image (+ caching for faster response)

Primary LanguageC#

placeholder-api

Deploy

High performance image placeholder generator API with caching support

Basically open-source alternative to placeholder.com

API URL

GET /placeholder?options

Features:

  • .NET Core built-in response compression (gzip)
  • .NET Core built-in response caching
  • EasyCaching library for caching the generated thumbnail for 5 minutes
  • Swagger API documentation /swagger

Options:

  • height: Integer => 100 (default)
  • width: Integer => 100 (default)
  • color: KnownColor (enum) => LightGrey (default)
  • text: String => "thumbnail" (default)
  • format: KnownImageFormat (enum) => Png (default)

Enums:

Example:

http://localhost:5000/Placeholder?height=100&width=200&text=Thumbnail&format=Png&color=Grey

Thumbnail