-
Set environment variables for imgproxy
cp .env.example .env
- Set values in
.env
forIMGPROXY_KEY
andIMGPROXY_SALT
(echo $(xxd -g 2 -l 64 -p /dev/random | tr -d '\n')
will do - see imgproxy docs)
- Set up a free account on imgix
- Follow the quick-start guide
- use any appropriate name for your subdomain
- select "web proxy" for your storage location
- Add
IMGIX_DOMAIN
to your .env (e.g.pluggable-rendition-backends.imgix.net
) - Take a note of your imgix signature key - this can be retrieved by revealing the "token" in the security section of the dashboard for your source
- add
IMGIX_SIGNATURE_KEY
to your .env, with this value
- add
- Run a reverse proxy targeting port 8000 on your machine, e.g. with ngrok. This is necessary as imgix is a hosted service and needs to query your local application server for the original rendition
- Build and run the containers (one for Wagtail, one for imgproxy)
export HOSTUID=$(id -u) # make web container user ID match host user ID
export PROXY_URL_FOR_IMGIX='e.g. your ngrok URL'
docker-compose up
- Create a superuser
docker-compose exec web bash
python manage.py createsuperuser
-
Create an instance of ImageTestingPage, adding some images to the StreamField
-
View your new page