Here’s a simple django view which creates a PIL image on the fly, and returns it as a PNG image: from django.utils.httpwrappers import HttpResponse from PIL import Image import random INK = "red", "blue", "green", "yellow" def image(request): # ... create/load image here ... image = Image.new("RGB", (800, 600), random.choice(INK)) # serialize to HTTP response response = HttpResponse(mimetype="imag