fix(photos): รูปโรงหนังแตก — mirror รูปภายนอกมาเก็บในโปรเจกต์ + fallback

สาเหตุ: photos[] อ้างลิงก์ hotlink (googleusercontent/gstatic/fbcdn ฯลฯ)
ซึ่งตอบ 200 แต่ 0 ไบต์เมื่อลิงก์หมดอายุ/ถูกจำกัด rate → รูปแตกเงียบ ๆ
เช่น /cinema/phahol-theatre

- scripts/mirror-photos.mjs: ดาวน์โหลด 20 รูปจาก 12 โรง มาเก็บ public/images/cinemas
  แล้วแก้ content.json ชี้ path ในโปรเจกต์ (สำรอง .bak-photos-* ก่อนเขียน) → เหลือรูปภายนอก 0
- บีบอัดรูปใหญ่ (<=1600px, q82): 6.12 MB → 2.91 MB
- PhotoImage: img + onError fallback เป็นโลโก้ (ใช้ใน CinemaCard/Gallery) กันรูปแตกทุกกรณี
- scripts/audit-photos.mjs: ตรวจรูปเสีย exit 1
- DESIGN.md: กฎรูปภาพ (ห้าม hotlink, ต้องใช้ PhotoImage, เพดานขนาด)
This commit is contained in:
Bkk1234 committed 2026-11-15 22:32:52 +07:00
1 parent f3798e40da
commit 251932e548
27 files changed
+300 -15

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
@echo off
REM เปิด dev server ของ alterflixhub (http://127.0.0.1:8080) — ปิดด้วยการกด Enter
powershell -NoProfile -ExecutionPolicy Bypass -File "D:\Gitin\dev-server.ps1" -Name "alterflixhub" -Cwd "D:\Git\workspace\web-alterflixhub" -Port 8080 -Command "pnpm dev" -Url "http://127.0.0.1:8080/" -TimeoutSec 300
pause