Skip to content

Releases: caarmen/image-resizer

Add user_agent query parameter

16 Jan 20:59
bd67bfa
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.7...v0.0.8

v0.0.7: Make generated api doc configurable

30 Jul 12:54
76ba6e8
Compare
Choose a tag to compare

The following generated documentation urls are exposed. They can be disabled by unsetting their
environment variables.

Documentation type Environment variable Default value
OpenAPI json OPENAPI_URL /openapi.json
ReDoc REDOC_URL /redoc
Swagger UI DOCS_URL /docs

Example to disable all documentation urls:

Docker:

docker run --detach --env OPENAPI_URL= --env REDOC_URL= --env DOCS_URL= --publish 8000:8000 ghcr.io/caarmen/image-resizer

Local:

OPENAPI_URL= REDOC_URL= DOCS_URL= python -m imageresizer.main

v0.0.6: Add allowed and denied domain lists

17 Jul 01:40
cff152d
Compare
Choose a tag to compare

Added two environment variables to configure server behavior:

  • DENIED_DOMAINS: Requests to resize images on domains in this list will result in a 422 error
  • ALLOWED_DOMAINS: If non-empty: requests to resize images on domains not in this list will result in a 422 error

v0.0.5: Improve error handling

17 Jul 01:05
0cd9dbf
Compare
Choose a tag to compare
Pre-release

Manage these error cases:

  • Unparseable image url: return 400
  • Image url with non-existant domain name: return 422
  • Error trying to open the image at the given url: return 422
  • Invalid url schema: return 422
    • Only https is allowed by default, but this can be overridden with the SUPPORTED_IMAGE_URL_SCHEMAS. For example to also support http, set SUPPORTED_IMAGE_URL_SCHEMAS=["https","http"]

v0.0.4: Add `crop` value for `scale_type` query param

16 Jul 20:12
0639956
Compare
Choose a tag to compare

If the scale_type is set to crop: Resize the image so that it fills the requested size, without distorting the image, but cropping along one axis if the aspect ratio of the source is different from the requested aspect ratio.

v0.0.3: Store `image_format` as integer, and documentation updates

15 Jul 22:51
Compare
Choose a tag to compare
  • Use int instead of string for the image_format column in the database.
  • Correct some docstrings.
  • Change the way the static doc is generated: use a fixed html file, and pull the openapi.json file from the running local server.
  • Fix the license (it was missing half of a sentence, and it wasn't recognized by GitHub).

v0.0.2: Update README and correct server configuration

15 Jul 00:01
Compare
Choose a tag to compare

Parameters corrections:

  • Use consistent naming and default values for LOG_DIR and CACHE_DIR environment variables
  • Make docker_remove_containers.bash delete image resizer Docker containers built locally or downloaded from Github packages
  • Read UVICORN_PORT environment variable for specifying the port

Documentation:

  • Add quick start to be able to download the docker image without cloning this repo
  • Update documentation to specify how to use environment variables when running the server locally

v0.0.1

14 Jul 22:26
Compare
Choose a tag to compare
v0.0.1 Pre-release
Pre-release

First version of image-resizer.

Provides an endpoint to resize images.