def image_iterator(self, connection, headers, body): if self._sendable(body): return SendFileIterator(connection, body) elif self._iterable(body): return utils.chunkreadable(body) else: return ImageBodyIterator(body)