Repository navigation
Version 0.5.0
Introduction
Hi everyone!
imgproxykit 0.5.0 is the first release with a fairly stable API. There will probably still be breaking changes, but I don’t expect major changes to the architecture.
Thanks to everyone who supports the project, tries the library, shares ideas, and reports issues. Your feedback helps a lot!
What's Changed
Features
- Added
Watermarkfactories for anchor positions and repeated tiling
with optional spacing, #120 Crop,Extend, andExtendAspectRationow acceptGravityinstances
to configure anchors and offsets. Gravity types prevent using smart
gravity for canvas extension during static type checking, #120- Added
Trim.transparent()to trim transparent borders with optional
symmetry flags without specifying imgproxy's transparency key color, #119 - Added
Expires.at()andExpires.after()factories for timezone-aware
deadlines and relative lifetimes, #118 - Added dataclass support to
Client.variants(): declare URL fields with
Annotated[str, Transform(...)]and pass the class to receive a typed
instance, #108 - Added
Resize,Padding, andBackgroundfactories to select resizing
strategies, configure uniform or symmetric padding, and set or explicitly
disable background colors, #107 - Added
Client(source_encoding='plain')to generate URLs with
percent-encoded sources and imgproxy's/plain/marker. Base64 remains
the default, #106 - Added
Gravityfactories to configure crop positioning without
using protocol codes, #104 - Added
Transform.extend()to create a new transformation with additional
typed options and scalar keyword arguments, preserving the original, #103 - Added
Option.short_namewith documented processing option aliases and
Client(use_short_options=True)to use them in URLs. Full names remain
the default; options without a separate alias inheritNone, #79 - Added Django REST Framework integration with read-only serializer fields
for image URLs and named variants. Reuses Django settings, transformations,
and source resolution. Supports source strings and model file fields.
Install withpip install 'imgproxykit[drf]', #77
Breaking changes
- Removed string gravity codes and separate
offset_x/offset_yarguments
fromCrop,Extend, andExtendAspectRatio. Pass aGravityinstance,
such asgravity=Gravity.center(offset_x=10), instead, #120 - Renamed
imgproxykit.types.PositiontoGravityType.
Gravityis now generic and final; subclassing is no longer supported, #120 PathSerializernow requires thesource_encodingkeyword-only argument.
Custom path serializer constructors must accept it. Pass'base64'to
retain the previous source URL representation, #106- Renamed
arguments_separatortoargument_separator,
andunsigned_signaturetounsigned_markerinClient, its serializer
and signer components, and Django client settings. Update keyword arguments,
Django settings, and custom component constructors to use the new names, #102 - Removed
imgproxykit.types.OptionType. Processing option names now use
str, allowing custom options to define their own protocol names, #79 PathSerializernow requires theuse_short_options
keyword-only argument, #80
Misc
- Reworked documentation and added a Django Modern REST integration example, #109
New Contributors
- @milssky made their first contribution in #74
- @Vijaysir0hi made their first contribution in #89
- @hamid-digitalmarketer made their first contribution in #90
- @HarshRajSinghania made their first contribution in #85
Full Changelog: v0.4.0...v0.5.0