diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml
new file mode 100644
index 0000000..18d3b16
--- /dev/null
+++ b/.github/workflows/dependencies.yml
@@ -0,0 +1,66 @@
+name: Dependencies builds
+
+on:
+  push:
+    branches: [master]
+  pull_request:
+    branches: [master]
+  schedule:
+    # At 23:18 every Wednesday, 2 hours before `photoview`. Details in https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
+    - cron: '18 23 * * 3'
+
+env:
+  IS_PUSHING_IMAGES: ${{ github.event_name != 'pull_request' && github.repository == 'photoview/photoview' }}
+  DOCKER_USERNAME: viktorstrate
+  DOCKER_IMAGE: viktorstrate/dependencies
+  DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
+  PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
+
+jobs:
+  build:
+    name: Build Dependencies Image
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v3
+        with:
+          platforms: ${{ env.PLATFORMS }}
+
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
+
+      - name: Docker Login
+        if: ${{ env.IS_PUSHING_IMAGES == 'true' }}
+        uses: docker/login-action@v3
+        with:
+          username: ${{ env.DOCKER_USERNAME }}
+          password: ${{ env.DOCKER_PASSWORD }}
+
+      - name: Docker meta
+        id: docker_meta
+        uses: docker/metadata-action@v5
+        with:
+          # list of Docker images to use as base name for tags
+          images: ${{ env.DOCKER_IMAGE }}
+          # Docker tags based on the following events/attributes
+          tags: |
+            type=sha
+
+      - name: Build and push
+        uses: docker/build-push-action@v6
+        with:
+          context: ./dependencies
+          platforms: ${{ env.PLATFORMS }}
+          pull: true
+          push: ${{ env.IS_PUSHING_IMAGES }}
+          tags: ${{ steps.docker_meta.outputs.tags }}
+          labels: ${{ steps.docker_meta.outputs.labels }}
+          cache-from: ${{ ( github.event_name == 'pull_request' && 'type=gha' ) || 'type=local' }}
+          cache-to: ${{ ( github.event_name == 'pull_request' && 'type=gha,mode=max' ) || 'type=local' }}
+          sbom: true
+          provenance: mode=max
+          annotations: ${{ steps.docker_meta.outputs.annotations }}
diff --git a/dependencies/Dockerfile b/dependencies/Dockerfile
new file mode 100644
index 0000000..a362745
--- /dev/null
+++ b/dependencies/Dockerfile
@@ -0,0 +1,26 @@
+FROM --platform=${BUILDPLATFORM:-linux/amd64} debian:bookworm-slim AS build
+ARG TARGETPLATFORM
+
+# See for details: https://github.com/hadolint/hadolint/wiki/DL4006
+SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
+
+RUN mkdir -p /tmp/build
+WORKDIR /tmp/build
+
+COPY prepare.sh /tmp/build/
+RUN ./prepare.sh
+
+COPY build_libraw.sh /tmp/build/
+RUN export $(cat /env) && ./build_libraw.sh
+COPY build_libheif.sh /tmp/build/
+RUN export $(cat /env) && ./build_libheif.sh
+COPY build_imagemagick.sh /tmp/build/
+RUN export $(cat /env) && ./build_imagemagick.sh
+COPY download_jellyfin-ffmpeg.sh /tmp/build/
+RUN export $(cat /env) && ./download_jellyfin-ffmpeg.sh
+
+COPY output.sh /
+RUN /output.sh
+
+FROM debian:bookworm-slim AS release
+COPY --from=build /artifacts.tar.gz /
diff --git a/dependencies/README.md b/dependencies/README.md
new file mode 100644
index 0000000..42eee7b
--- /dev/null
+++ b/dependencies/README.md
@@ -0,0 +1,2 @@
+# Workers
+This is used to build and store 3rd-party dependencies for Photoview products
diff --git a/dependencies/build_imagemagick.sh b/dependencies/build_imagemagick.sh
new file mode 100755
index 0000000..f2160c0
--- /dev/null
+++ b/dependencies/build_imagemagick.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -eu
+
+: ${DEB_HOST_MULTIARCH=`uname -m`-linux-gnu}
+: ${DEB_HOST_ARCH=`dpkg --print-architecture`}
+
+echo Compiler: ${DEB_HOST_MULTIARCH} Arch: ${DEB_HOST_ARCH}
+
+apt-get install -y libjxl-dev:${DEB_HOST_ARCH} libfftw3-dev:${DEB_HOST_ARCH} liblcms2-dev:${DEB_HOST_ARCH} liblqr-1-0-dev:${DEB_HOST_ARCH} zlib1g-dev:${DEB_HOST_ARCH} liblzma-dev:${DEB_HOST_ARCH} libbz2-dev:${DEB_HOST_ARCH} libdjvulibre-dev:${DEB_HOST_ARCH} libexif-dev:${DEB_HOST_ARCH} libjpeg-dev:${DEB_HOST_ARCH} libopenjp2-7-dev:${DEB_HOST_ARCH} libopenexr-dev:${DEB_HOST_ARCH} libpng-dev:${DEB_HOST_ARCH} libtiff-dev:${DEB_HOST_ARCH} libwmf-dev:${DEB_HOST_ARCH} libwebp-dev:${DEB_HOST_ARCH} libxml2-dev:${DEB_HOST_ARCH}
+URL=$(curl -s https://api.github.com/repos/ImageMagick/ImageMagick/releases/latest | grep "tarball_url" | cut -d : -f 2,3 | tr -d ' ,"')
+echo download ImageMagick from $URL
+curl -L -o ./magick.tar.gz "$URL"
+
+tar xfv ./magick.tar.gz
+cd ImageMagick-*
+./configure --enable-static --enable-delegate-build --disable-shared --host=${DEB_HOST_MULTIARCH}
+make
+make install
+cd ..
+
+mkdir -p /output/bin
+cp /usr/local/bin/magick /output/bin/
+file /output/bin/magick
diff --git a/dependencies/build_libheif.sh b/dependencies/build_libheif.sh
new file mode 100755
index 0000000..1815837
--- /dev/null
+++ b/dependencies/build_libheif.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+set -eu
+
+: ${DEB_HOST_MULTIARCH=`uname -m`-linux-gnu}
+: ${DEB_HOST_ARCH=`dpkg --print-architecture`}
+
+echo Compiler: ${DEB_HOST_MULTIARCH} Arch: ${DEB_HOST_ARCH}
+
+apt-get install -y libaom-dev:${DEB_HOST_ARCH} libavcodec-dev:${DEB_HOST_ARCH} libdav1d-dev:${DEB_HOST_ARCH} libde265-dev:${DEB_HOST_ARCH} libgdk-pixbuf-2.0-dev:${DEB_HOST_ARCH} libjpeg-dev:${DEB_HOST_ARCH} libopenjp2-7-dev:${DEB_HOST_ARCH} libpng-dev:${DEB_HOST_ARCH} librav1e-dev:${DEB_HOST_ARCH} libsvtav1enc-dev:${DEB_HOST_ARCH} libx265-dev:${DEB_HOST_ARCH}
+URL=$(curl -s https://api.github.com/repos/strukturag/libheif/releases/latest | grep "tarball_url" | cut -d : -f 2,3 | tr -d ' ,"')
+echo download libraw from $URL
+curl -L -o ./libheif.tar.gz "$URL"
+
+tar xfv ./libheif.tar.gz
+cd *-libheif-*
+cmake --preset=release -DCMAKE_SYSTEM_PROCESSOR=${DEB_HOST_ARCH} -DCMAKE_C_COMPILER=${DEB_HOST_MULTIARCH}-gcc -DCMAKE_CXX_COMPILER=${DEB_HOST_MULTIARCH}-g++ -DPKG_CONFIG_EXECUTABLE=${DEB_HOST_MULTIARCH}-pkg-config -DCMAKE_LIBRARY_ARCHITECTURE=${DEB_HOST_MULTIARCH} -DPLUGIN_DIRECTORY=/usr/lib/${DEB_HOST_MULTIARCH}/libheif/plugins .
+make
+make install
+cd ..
+
+mkdir -p /output/lib /output/include /output/pkgconfig
+cp -a /usr/local/lib/libheif* /output/lib/
+cp -a /usr/local/lib/pkgconfig/libheif* /output/pkgconfig/
+cp -a /usr/local/include/libheif /output/include/
+file /usr/local/lib/libheif.so*
diff --git a/dependencies/build_libraw.sh b/dependencies/build_libraw.sh
new file mode 100755
index 0000000..6fb70d4
--- /dev/null
+++ b/dependencies/build_libraw.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -eu
+
+: ${DEB_HOST_MULTIARCH=`uname -m`-linux-gnu}
+: ${DEB_HOST_ARCH=`dpkg --print-architecture`}
+
+echo Compiler: ${DEB_HOST_MULTIARCH} Arch: ${DEB_HOST_ARCH}
+
+apt-get install -y zlib1g-dev:${DEB_HOST_ARCH} liblcms2-dev:${DEB_HOST_ARCH} libjpeg-dev:${DEB_HOST_ARCH}
+URL=$(curl -s https://api.github.com/repos/LibRaw/LibRaw/releases/latest | grep "tarball_url" | cut -d : -f 2,3 | tr -d ' ,"')
+echo download libraw from $URL
+curl -L -o ./libraw.tar.gz "$URL"
+
+tar xfv ./libraw.tar.gz
+cd LibRaw-*
+autoreconf --install
+./configure --disable-option-checking --disable-silent-rules --disable-maintainer-mode --disable-dependency-tracking --host=${DEB_HOST_MULTIARCH}
+make
+make install
+cd ..
+
+mkdir -p /output/lib /output/include /output/pkgconfig
+cp -a /usr/local/lib/libraw_r* /output/lib/
+cp -a /usr/local/lib/pkgconfig/libraw* /output/pkgconfig/
+cp -a /usr/local/include/libraw /output/include/
+file /usr/local/lib/libraw_r.so*
diff --git a/dependencies/download_jellyfin-ffmpeg.sh b/dependencies/download_jellyfin-ffmpeg.sh
new file mode 100755
index 0000000..cd4e60f
--- /dev/null
+++ b/dependencies/download_jellyfin-ffmpeg.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -euo pipefail
+
+: ${DEB_HOST_MULTIARCH=x86_64-linux-gnu}
+: ${DEB_HOST_ARCH=amd64}
+
+echo Compiler: ${DEB_HOST_MULTIARCH} Arch: ${DEB_HOST_ARCH}
+
+URL=$(curl -s https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/latest | grep \"browser_download_url\".*bookworm_${DEB_HOST_ARCH} | cut -d : -f 2,3 | tr -d ' ,"')
+echo download jellyfin-ffmpeg from $URL
+curl -L -o ./jellyfin-ffmpeg.deb "$URL"
+
+mkdir -p /output/deb
+cp ./jellyfin-ffmpeg.deb /output/deb/
diff --git a/dependencies/output.sh b/dependencies/output.sh
new file mode 100755
index 0000000..9bea8ef
--- /dev/null
+++ b/dependencies/output.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -eu
+
+cd /output
+tar czfv /artifacts.tar.gz *
diff --git a/dependencies/prepare.sh b/dependencies/prepare.sh
new file mode 100755
index 0000000..c21aabc
--- /dev/null
+++ b/dependencies/prepare.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+set -eu
+
+: ${TARGETPLATFORM=linux/`dpkg --print-architecture`}
+
+TARGETOS="$(echo $TARGETPLATFORM | cut -d"/" -f1)"
+TARGETARCH="$(echo $TARGETPLATFORM | cut -d"/" -f2)"
+TARGETVARIANT="$(echo $TARGETPLATFORM | cut -d"/" -f3)"
+
+DEBIAN_ARCH=$TARGETARCH
+if [ "$TARGETARCH" = "arm" ]
+then
+  DEBIAN_ARCH=armhf
+  if [ "$TARGETVARIANT" = "v5" ]
+  then
+    DEBIAN_ARCH=armel
+  fi
+fi
+
+dpkg --add-architecture $DEBIAN_ARCH
+apt-get update
+apt-get install -y curl crossbuild-essential-${DEBIAN_ARCH} libc-dev:${DEBIAN_ARCH} autoconf automake libtool m4 pkg-config cmake
+
+dpkg-architecture -a $DEBIAN_ARCH >/env
+cat /env
