Improve social media sharing image for videos

Update the Open Graph image tag in the VideoPage component to prioritize custom thumbnails, then video thumbnails, and finally a fallback social share image (go4-video-social-share.png) for improved social media previews.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 344ec1e0-1186-4058-bbff-2e9619a7b1e0
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/344ec1e0-1186-4058-bbff-2e9619a7b1e0/zJYuV6w
This commit is contained in:
sebastjanartic 2025-08-31 08:00:14 +00:00
parent e28cb10ba3
commit f9f1ad7ffe
4 changed files with 2 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 KiB

View File

@ -127,8 +127,8 @@ export default function VideoPage() {
updateMetaTag('og:title', currentVideo.title);
updateMetaTag('og:description', currentVideo.description || `Watch ${currentVideo.title} on go4.video`);
// Use custom thumbnail if available, otherwise default thumbnail
const thumbnailForSharing = currentVideo.customThumbnailUrl || currentVideo.thumbnailUrl;
// Use custom thumbnail if available, otherwise video thumbnail, fallback to social share image
const thumbnailForSharing = currentVideo.customThumbnailUrl || currentVideo.thumbnailUrl || '/go4-video-social-share.png';
updateMetaTag('og:image', thumbnailForSharing);
updateMetaTag('og:url', window.location.href);
updateMetaTag('og:type', 'video.other');

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 806 KiB