update optimage/index.js