Update image_layout js to fix img load order issue