fix performance problem when many images and fix some ui breaks when images