Skip to content

Commit 7a332c6

Browse files
committed
Fix image loading errors - improve error handling and fallback display
1 parent 8cd5cd3 commit 7a332c6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sotuwo/graduation_book.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,9 @@
497497
return `
498498
<div class="student-profile">
499499
<div class="student-photo">
500-
<img src="${imagePath}" alt="${student.name}" onerror="this.style.display='none'; this.parentElement.innerHTML='👤';">
500+
<img src="${imagePath}" alt="${student.name}"
501+
onerror="this.style.display='none'; this.parentElement.innerHTML='<div style=\"display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; color: #a09080; text-align: center; padding: 20px;\">👤<br><small style=\"font-size: 0.8rem; color: #666;\">画像準備中</small></div>';"
502+
onload="this.style.display='block';">
501503
</div>
502504
<div class="student-name">${student.name}</div>
503505
<div class="student-info">

0 commit comments

Comments
 (0)