Return relative image paths from API for Next.js frontend

Changed getFeaturedImageUrlAttribute to return relative paths
(e.g., /images/blog/photo.jpg) instead of full Laravel storage URLs.
Migrated image paths updated from migrated-images/ to images/ prefix.
Images are now served from Next.js public/ directory via Vercel CDN.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 16:32:18 +08:00
parent a30af8eaf7
commit dd7077f77b

View File

@@ -447,6 +447,7 @@ class Article extends Model
return null;
}
return asset('storage/'.$this->featured_image_path);
// Return relative path for Next.js frontend (images served from public/)
return '/'.$this->featured_image_path;
}
}