Improve image script.