fix #25230: stop when reading image