load_images.js: fix function update