use html to generate image