What does it do?#

Provides image-conversion, resizing and optimisation aliases. Unlike the core aliases, this file is not sourced automatically — you need to add it explicitly.

Enabling it#

Bash / zsh#

source ~/.docker-devtools/docker-devtools.sh
source ~/.docker-devtools/images/docker-image-devtools.sh

PowerShell#

. "$HOME/.docker-devtools/docker-devtools.ps1"
. "$HOME/.docker-devtools/images/docker-image-devtools.ps1"

Commands#

Commands you can run to use this.

Aliases#

AliasToolImage
jpegtran-dockerJPEG lossless transformation (mozjpeg)datawraith/mozjpeg
magick-docker / convert-dockerImageMagick — conversion & resizingdpokidov/imagemagick:latest
mogrify-dockerImageMagick — in-place batch conversion/resizedpokidov/imagemagick:latest
identify-dockerImageMagick — image metadata/infodpokidov/imagemagick:latest
vipsthumbnail-dockerlibvips — fast, low-memory thumbnailing/resizingmarcbachmann/libvips:latest
cwebp-docker / dwebp-dockerWebP encode/decodetakecy/webp:latest

Usage#

# Resize an image with ImageMagick
magick-docker input.jpg -resize 50% output.jpg

# Batch-resize and reformat in place
mogrify-docker -resize 800x600 -format png *.jpg

# Generate a fast thumbnail with libvips
vipsthumbnail-docker input.jpg --size 200x200 -o thumb.jpg

# Convert to/from WebP
cwebp-docker input.png -o output.webp
dwebp-docker output.webp -o roundtrip.png

Note: jpegtran-docker doesn’t use --entrypoint — it passes jpegtran as a plain argument to the image’s default entrypoint. convert-docker is a deprecated convenience alias for magick-docker (both invoke ImageMagick’s magick binary; there’s no separate legacy convert binary in the image). The ImageMagick aliases mount to /imgs inside the container while the others mount to /images — a harmless inconsistency since both are bind-mounts of your current host directory.

PowerShell: images/docker-image-devtools.ps1 now has full parity with the Bash version — all 9 aliases (jpegtran-docker, magick-docker/convert-docker, mogrify-docker, identify-docker, vipsthumbnail-docker, cwebp-docker/dwebp-docker, exiftool-docker) are implemented. See the PowerShell page for the full platform-parity breakdown.

The Sources#

GitHub: https://github.com/willhallonline/docker-devtools-aliases

Find out more#