Try to fix memory issue when read all images, failed