fix CRLF
use dictionary for img