API endpoint - POST /api/2/img/warmup?auth=[API_SECRET]


/warmup executes optimisations and caches them, so it will speed up the first response time from the real user.

The typical usecase could be an application where the user can upload images by themselves and then see them once uploaded. The first render could take some time (1-4 seconds) and using /warmup will decrease the response time.

The below example will warmup caches for 2 variants of the image:

The URLs you pass to the images array should be exact the same you use in your FrontEnd implementation.

curl -X POST -H 'Content-Type: application/json' \
'https://pixboost.com/api/2/img/warmup?auth=ABCDEF' \
-d '{"images: ["https://pixboost.com/api/2/img/http://www.midday.coffee/banner.jpeg/resize?size=x100&auth=ABCDEF","https://pixboost.com/api/2/img/http://www.midday.coffee/banner.jpeg/resize?fit=100x100&auth=ABCDEF"]}'


API_SECRET - secret key.


202 - The warmup has been successfully initiated.


You can find reference example of using cache invalidation workflow with S3 bucket here. You can replace cache invalidation call with /warmup in Lambda.


Maximum number of images to warmup in one call is 20. This is a soft limit and could be increased on request.