Add Javascript to to control the image type and zize

Add Javascript to to control the image type and zize