Fix build error
move inline script to external js
add missing build option for images
tested build version