Calling setState() after FileReader.onload triggered a full popup re-render which could crash or close the popup with large images. Update DOM elements in place instead, and add error handling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>