output SQL for image table update, refactor ImagePoolWorker to be a mixin