🖼️ Pic Placeholder
Pic placeholder is a stylish image placeholder with 6 categories (animals, cats, dogs, houses, landscapes & people) which collectively sums up to 500+ images.
Overview video
Here's a short video that explains the project and how it uses redis
How it works
Pic placeholder is a microservice that provides endpoints to get placeholder images. These endpoints are:
-
/api/categories/[type]
- returns JSON of all images with the supported types filtered from redis
-
/api/images/[id]
- redirects to specific image stored on aws S3
-
/api/images
- returns JSON of all images from redis
-
/api/random/[category]
- redirects to a random image matching the category
-
/api/random
- redirects to a random image
How the data is stored:
There are two parts to this; the Redis JSON storage and the aws s3 storage.
-
The Redis JSON contains the placeholders which are of this schema:
…{ file: { type: "number" } width: { type: "number" }, height: { type: