--- /dev/null
+SRC = media/src
+DEST = media/build
+
+# full-sized image dimensions
+WIDTH = 960
+HEIGHT = 480
+
+HALF_WIDTH = 480
+HALF_HEIGHT = 240
+
+THIRD_WIDTH = 320
+THIRD_HEIGHT = 160
+
+THUMBNAILS = \
+ $(DEST)/SWC-logo.svg \
+ $(DEST)/USACE-logo.svg
+
+
+.PRECIOUS: $(DEST)/% $(DEST)/%.png $(DEST)/%.pdf
+
+all: $(THUMBNAILS)
+
+clean:
+ rm -f $(DEST)/*
+
+## Vector formats that can be rendered directly by the browser
+
+$(DEST)/%: $(SRC)/vector/%
+ cp "$(<)" "$(@)"
+
+## Get the high-resolution source into PNG format
+
+# plain copy
+$(DEST)/%: $(SRC)/binary/%
+ cp "$(<)" "$(@)"
+
+# TODO: re-render and crop?
+$(DEST)/%: $(SRC)/matplotlib/%
+ cp "$(<)" "$(@)"
+
+# TODO: re-render and crop?
+$(DEST)/%: $(SRC)/tikz/%
+ cp "$(<)" "$(@)"
+
+# convert JPEGs
+$(DEST)/%.png: $(SRC)/binary/%.jpg
+ convert "$(<)" "$(@)"
+
+# convert PDFs
+$(DEST)/%.png: $(SRC)/binary/%.pdf
+ convert -density 350 "$(<)" "$(@)"
+
+## Convert to the desired geometry
+
+# full width, full height
+$(DEST)/%-fw-fh.png: $(DEST)/%.png
+ convert -format png -strip -quality 95 "$(<)" -thumbnail $(WIDTH)x$(HEIGHT) "$(@)"
+
+# half width, full height
+$(DEST)/%-hw-fh.png: $(DEST)/%.png
+ convert -format png -strip -quality 95 "$(<)" -thumbnail $(HALF_WIDTH)x$(HEIGHT) "$(@)"
+
+# full width, half height
+$(DEST)/%-fw-hh.png: $(DEST)/%.png
+ convert -format png -strip -quality 95 "$(<)" -thumbnail $(WIDTH)x$(HALF_HEIGHT) "$(@)"
+
+# half width, half height
+$(DEST)/%-hw-hh.png: $(DEST)/%.png
+ convert -format png -strip -quality 95 "$(<)" -thumbnail $(HALF_WIDTH)x$(HALF_HEIGHT) "$(@)"
+
+# third width, third height
+$(DEST)/%-tw-th.png: $(DEST)/%.png
+ convert -format png -strip -quality 95 "$(<)" -thumbnail $(THIRD_WIDTH)x$(THIRD_HEIGHT) "$(@)"