From f2095eeb14db8db6558812225e5a0638d9fc9cd0 Mon Sep 17 00:00:00 2001 From: Ken D'Ambrosio Date: Tue, 16 Jun 2026 18:58:34 +0000 Subject: Fix OG image for photo links: use thumbnail, drop false dimension tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When ?photo= is in the URL, @og_use_media was forcing the full-res image (2-3MB) as the og:image. WhatsApp fetched it but showed no preview, likely due to size or timeout. Now uses the thumbnail. Also removed hardcoded og:image:width/height (1200x630) from individual photo/album pages — those dimensions only apply to the default fallback image and were causing WhatsApp to reject previews when the actual image dimensions didn't match the declared ones. Co-Authored-By: Claude Sonnet 4.6 --- views/layout.erb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/layout.erb b/views/layout.erb index d02a67a..6a85482 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -8,9 +8,12 @@ "> <% if @desc %><% end %> - "> + <% _og_img = og_image_url %> + "> + <% unless _og_img %> + <% end %> -- cgit v1.2.3