| Variable | Description |
|---|---|
DATABASE_URL |
Your Database URL |
DATABASE_PASSWORD |
Your Database Password |
IMGPROXY_KEY |
Your ImgProxy Key (HEX-Format) |
IMGPROXY_SALT |
Your ImgProxy Salt (HEX-Format) |
IMGPROXY_URL |
Your ImgProxy Base URL |
KEY: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
SALT: node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"
Windows
docker run
-p 8080:8080 ^
-v {PATH_TO_IMAGE_FOLDER}/pictures:/pictures:ro ^
-e IMGPROXY_LOCAL_FILESYSTEM_ROOT=/pictures ^
-e IMGPROXY_KEY={YOUR_KEY} -e IMGPROXY_SALT={YOUR_SALT} ^
-it ghcr.io/imgproxy/imgproxy:latest ^
Linux
docker run
-p 8080:8080 \
-v {PATH_TO_IMAGE_FOLDER}/pictures:/pictures:ro \
-e IMGPROXY_LOCAL_FILESYSTEM_ROOT=/pictures \
-e IMGPROXY_KEY={YOUR_KEY} -e IMGPROXY_SALT={YOUR_SALT} \
-it ghcr.io/imgproxy/imgproxy:latest \
Any Image Path that you try to sign and fetch with the getImgProxyURL() function must be relative to {PATH_TO_IMAGE_FOLDER}!
import { getImgProxyURL } from '$src/lib/imgproxy';