Generate img elements rather than canvas