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:
parent
e28cb10ba3
commit
f9f1ad7ffe
Binary file not shown.
|
After Width: | Height: | Size: 806 KiB |
BIN
client/public/go4-video-social-share.png
Normal file
BIN
client/public/go4-video-social-share.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 806 KiB |
@ -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 |
Loading…
Reference in New Issue
Block a user