for got to reference img var in readFileSync