Add generating images code