Use tempfiles for image storage rather than in-memory blobs