Capture high quality website screenshots using Thumbnail Microservice API
To use Thumbnail Microservice API clone the GitHub repository.
git clone https://github.com/Zahidul-Islam/thumbnail-microservice.git
cd thumbnail-microservice.git
npm install
Rename .env.template
file to .env
using mv .env.template .env
Update properties in .env file
PORT=8000
AWS_REGION=<YOUR_AWS_REGION>
AWS_ACCESS_KEY_ID=<YOUR_AWS_ACCESS_KEY_ID>
AWS_SECRET_ACCESS_KEY=<YOUR_AWS_SECRET_ACCESS_KEY>
S3_BUCKET_NAME=<YOUR_S3_BUCKET_NAME>
Run npm run dev
Thumbnail Microservice API is running on www.localhost:8000
The url format for making a REST api request to Thumbnail Microservice is:
http://<thumbnail-micorservice-api>/api/v1/thumbnails/?REQUEST_OPTIONS
Where:
REQUEST_OPTIONS
should be replaced by a query string that contains all of the options you want to set.
Below is a table listing all of the available options to the API.
Combine these options as parameters in the query string for e.g. ?url=google.com&size=window
Option | Example Value |
---|---|
size |
window/all |
viewport |
width x height (1024x768) |
quality | 75 |
renderDelay | 0 |
timeout | 0 |
The full HTTP url could be:
Copyright (c) 2017, Zahidul Islam. (MIT License)
See LICENSE for more info.