A better way to generate IMG