diff options
| author | Ken D'Ambrosio <ken@jots.org> | 2026-06-16 18:58:34 +0000 |
|---|---|---|
| committer | Ken D'Ambrosio <ken@jots.org> | 2026-06-16 18:58:34 +0000 |
| commit | f2095eeb14db8db6558812225e5a0638d9fc9cd0 (patch) | |
| tree | e90980188a631609e5582b5d4457135241a346bf /app.rb | |
| parent | a0803c8e87f375b1f138c7d1650ba21108f1cc62 (diff) | |
Fix OG image for photo links: use thumbnail, drop false dimension tags
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 <noreply@anthropic.com>
Diffstat (limited to 'app.rb')
| -rw-r--r-- | app.rb | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -445,7 +445,6 @@ def browse_album(rel) if params[:photo] && !params[:photo].empty? photo_name = File.basename(params[:photo]) @og_image_rel = rel.empty? ? photo_name : "#{rel}/#{photo_name}" - @og_use_media = true elsif !rel.empty? first_img = @entries.find { |e| %i[image video].include?(e[:type]) } @og_image_rel = if first_img |
