Working http_image solution, stripped down.