Skip to content

Version 0.6.0

Choose a tag to compare

@kondratevdev kondratevdev released this 06 Nov 09:30
· 63 commits to master since this release
d659f2c

What's Changed

Features

  • Added Transform.keyword_option_resolver_cls to customize how built-in
    keyword options are constructed. Transform.extend() preserves the
    subclass and its resolver, #136
  • Added Litestar integration with ImgproxyPlugin. Install with
    pip install 'imgproxykit[litestar]', #130
  • Added dataclass variant declarations to Django's imgproxy_variants()
    and IMGPROXYKIT['variants']. Passing a class directly returns a typed
    instance; named sets always return dictionaries. DRF's
    ImgproxyVariantsField accepts the same declarations and returns
    dictionaries of URLs, #127

Breaking changes

  • Renamed the cachebuster keyword to cache_buster in Transform and
    Transform.extend(), #136
  • Reserved transform keyword arguments for built-in options. Pass custom
    ScalarOption subclasses as positional instances, #136
  • Replaced imgproxykit.transform.ScalarOptions with
    imgproxykit.keyword_options.KeywordOptions, #136
  • Removed ScalarOption.from_kwarg(). Use KeywordOptionResolver.from_kwarg()
    for built-in keywords, #136
  • Removed the Option.validate hook. imgproxy validates processing option
    values when it handles the generated URL, #131

Misc

  • Documented how to define custom processing options with ScalarOption
    and Option, with an example combining them with built-in keywords, #136
  • Updated Django, DRF, FastAPI, and DMR integration guides with tabbed
    examples for transformations and variant declarations, #127
  • Improved the user guide with grouped processing option tables linking to
    the API reference and imgproxy documentation, tabbed variant examples,
    and shared collapsible instructions for running imgproxy locally, #125

Full Changelog: v0.5.0...v0.6.0