• v0.3.0 7c9d6ab9e8

    v0.3.0 Stable Stable

    asonix released this 2022-04-03 20:18:20 +00:00 | 913 commits to main since this release

    New APIs

    A few new endpoints have been created for retrieving metadata about uploaded and generated images. These apis return a details json object with an image's width, height, content_type, and created_at date. Information regarding these APIs can be found in README.md.

    Storage Changes

    This release features a completely redone media storage system, with pluggable backends. There are currently two backends that can be selected between from the commandline or configuration files:

    • filesystem: continue using files on disk for media storage
    • s3-store: use object storage for uploaded media

    For configuration options, see pict-rs.toml. For an exmaple migration file (moving from filesystem to object storage), see migrate.toml

    The filesystem storage layer itself has received a rework, and now stores images in a more efficient manner, no longer dumping all updated images into the $base/files folder. The migration from the old layout to the new layout will happen automatically after first launching pict-rs 0.3.

    io-uring

    This release also has an experimental io-uring compile flag, which is not enabled for the default builds attached to this release, or for the images on dockerhub. If you would like to run pict-rs with io-uring, you can build this project with --features io-uring. Currently, this flag enables in-thread file IO as well as the io-uring backend for sled. While this is not enabled by default, if you run a recent linux kernel (5.10 or newer, according to tokio-uring's documentation) you can run the io-uring enabled pict-rs for better throughput when serving media.

    Dependencies

    The files attached to this release, and other releases on this project are statically compiled against the musl-libc and require no extra dependencies to run. That said, pict-rs requires that ffmpeg, imagemagick, and perl-image-exiftool are installed and available in the $PATH. The docker images for pict-rs are built on the alpine:3.15 repositories. This means my tested & verified dependencies are as follows: ffmpeg 4.4.1, imagemagick 7.1.0.16, and perl-image-exiftool 12.30.

    If you run pict-rs with older or newer dependencies and you find they do not work (I'm nervous about thumbnail generation for gif and mp4 uploads on older ffmpeg releases, since I just changed a commandline flag for ffmpeg around that in a recent release candidate), feel free to let me know. I can't guarantee I'll support older versions but I can at least try.

    If you are building your own system to run pict-rs (i.e. not using my provided containers), take a look at policy.xml. This file describes what the imagemagick binaries are allowed to do, and I've done my best to limit the permissions to exactly what is needed to run pict-rs. If you need to support larger images than the defaults, you will need to edit and provide your own policy.xml file.

    Downloads