[READ-ONLY] Mirror of https://github.com/danielroe/ipx.
0

Configure Feed

Select the types of activity you want to include in your feed.

6 11 0

Clone this repository

https://git.vm.fail/danielroe.dev/ipx https://git.vm.fail/did:plc:5sjnx2coy6yllzvsqom4wnwa
ssh://git@knot1.tangled.sh:2222/danielroe.dev/ipx ssh://git@knot1.tangled.sh:2222/did:plc:5sjnx2coy6yllzvsqom4wnwa

For self-hosted knots, clone URLs may differ based on your setup.


README.md

🖼 IPX#

High performance, secure and easy to use image proxy based on Sharp and libvips.

WARNING:: THIS PROJECT AND DOCS ARE STILL WIP!

Project goals#

  • Fast and minimal as possible.
  • Configurable operations.
  • Built-in secure cache with human readable entries and resistant against duplicates.
  • Remote agnostic cache and input adapters.
  • Smart and auto cache cleaning.

API#

/{format}/{operations}/{src}

Operations are separated by a colon , (Example: op1,op2) and their arguments separated using underscore _ (Example: s_200_300)

ََ‍‍Use _ value in place for {format} or {operations} to keep original values of source image.

Possible values for format: jpeg,webp or png.

Examples#

Just change format to webp and keep other things same as source:

http://cdn.example.com/webp/_/avatars/buffalo.png

Keep original format (png) and set width to 200:

http://cdn.example.com/_/w_200/avatars/buffalo.png

Resize to 200x300px using embed method and change format to jpg:

http://cdn.example.com/jpg/s_200_300,embed/avatars/buffalo.png

Operations#

Operation Arguments Example Description
s width, height s:200:300 Resize image.
w width w:200 Change image with.
h height h:200 Change image height.
embed - embed Preserving aspect ratio, resize the image to the maximum width or height specified then embed on a background of the exact width and height specified.
max - max Preserving aspect ratio, resize the image to be as large as possible while ensuring its dimensions are less than or equal to the width and height specified.
min - min Preserving aspect ratio, resize the image to be as small as possible while ensuring its dimensions are greater than or equal to the width and height specified.

License#

MIT - Pooya Parsa