-
v0.3.0 Stable Stable
released this
2022-04-03 20:18:20 +00:00 | 913 commits to main since this releaseNew 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'swidth
,height
,content_type
, andcreated_at
date. Information regarding these APIs can be found inREADME.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), seemigrate.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 forsled
. 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
, andperl-image-exiftool
are installed and available in the$PATH
. The docker images for pict-rs are built on thealpine:3.15
repositories. This means my tested & verified dependencies are as follows:ffmpeg 4.4.1
,imagemagick 7.1.0.16
, andperl-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.Links
- git: https://git.asonix.dog/asonix/pict-rs
- matrix: https://matrix.to/#/#pictrs:matrix.asonix.dog
- dockerhub: https://hub.docker.com/r/asonix/pictrs
- asonix on mastodon https://masto.asonix.dog/@asonix
Downloads
- Source Code (ZIP)
- Source Code (TAR.GZ)
-
pict-rs-linux-amd64
18 MiB
-
pict-rs-linux-arm32v7
15 MiB
-
pict-rs-linux-arm64v8
15 MiB