Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add link preview metadata to photos web app

Anand Baburajancf79aa2d4c4a
diff --git a/web/apps/photos/public/images/preview.jpg b/web/apps/photos/public/images/preview.jpg
deleted file mode 100644
index 2e3d9f1da4..0000000000
Binary files a/web/apps/photos/public/images/preview.jpg and /dev/null differ
diff --git a/web/apps/photos/public/images/preview.png b/web/apps/photos/public/images/preview.png
new file mode 100644
index 0000000000..2c274d5edd
Binary files /dev/null and b/web/apps/photos/public/images/preview.png differ
diff --git a/web/apps/photos/src/pages/_app.tsx b/web/apps/photos/src/pages/_app.tsx
index bb1dfa49f8..f4e03e4015 100644
--- a/web/apps/photos/src/pages/_app.tsx
+++ b/web/apps/photos/src/pages/_app.tsx
@@ -61,6 +61,9 @@ import "../styles/global.css";
type PhotosAppProps = AppProps<Record<string, unknown>>;
+const photosDescription = "Store and share your photos with absolute privacy.";
+const photosPreviewImage = "https://photos.ente.com/images/preview.png";
+
type MainContentProps = Pick<PhotosAppProps, "Component" | "pageProps"> & {
isChangingRoute: boolean;
};
@@ -165,7 +168,19 @@ const App: React.FC<PhotosAppProps> = ({ Component, pageProps }) => {
return (
<ThemeProvider theme={photosTheme}>
- <CustomHead title={title} />
+ <CustomHead title={title} description={photosDescription}>
+ <meta property="og:type" content="website" />
+ <meta property="og:title" content={title} />
+ <meta property="og:description" content={photosDescription} />
+ <meta property="og:image" content={photosPreviewImage} />
+ <meta property="og:image:type" content="image/png" />
+ <meta property="og:image:width" content="1200" />
+ <meta property="og:image:height" content="630" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:title" content={title} />
+ <meta name="twitter:description" content={photosDescription} />
+ <meta name="twitter:image" content={photosPreviewImage} />
+ </CustomHead>
<CssBaseline enableColorScheme />
<ThemedLoadingBar ref={loadingBarRef} />