Skip to content

Docker container with public API for squoosh library

Notifications You must be signed in to change notification settings

dumkin/squoosh-api

Repository files navigation

Squoosh API

API server for image processing through Squoosh deployed in Docker

Documentation

POST /info

Get image sizes

Request (json)

{
    "image": "image_as_base64"
}

Response (json)

{
    "width": 1234,
    "height": 1234
}

POST /

Process image.

Request (json)

{
    "image": "image_as_base64",
    "resize": {
        "enabled": true,
        "width": 720,
        "height": 542,
        ...
    },
    "mozjpeg": {
        "quality": 75,
        ...
    }
}

Response (raw body)

image_as_base64

Preprocess parameters example

Parameters for the processor can be taken from the site squoosh.app

image

About

Docker container with public API for squoosh library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages