From df63ad1799929a55626819d6fba6f6bf9585282e Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sat, 10 May 2025 17:37:14 -0700 Subject: [PATCH] fix(oembed.php + og-image.php): route oembed images through proxy --- api/oembed.php | 4 ++-- api/og-image.php | 20 +++++++------------- package-lock.json | 4 ++-- package.json | 2 +- src/meta/htaccess.liquid | 5 +++++ 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/api/oembed.php b/api/oembed.php index 5cea468..a1bf6be 100644 --- a/api/oembed.php +++ b/api/oembed.php @@ -29,7 +29,7 @@ class OembedHandler extends BaseHandler 'author_name' => $globals['author'], 'provider_name' => $globals['site_name'], 'provider_url' => $globals['url'], - 'thumbnail_url' => $globals['url'] . $item['image_url'], + 'thumbnail_url' => $globals['url'] . '/og/w800' . $item['image_url'], 'html' => '' . htmlspecialchars($item['title']) . '', ]); } @@ -44,7 +44,7 @@ class OembedHandler extends BaseHandler 'author_name' => $globals['author'], 'provider_name' => $globals['site_name'], 'provider_url' => $globals['url'], - 'thumbnail_url' => $globals['url'] . $globals['avatar'], + 'thumbnail_url' => $globals['url'] . '/og/w800' . $globals['avatar'], 'html' => '' . htmlspecialchars($title) . '', ]); } diff --git a/api/og-image.php b/api/og-image.php index 64eb118..97970db 100644 --- a/api/og-image.php +++ b/api/og-image.php @@ -1,10 +1,12 @@