bingo: 1200x630 JPEG for og:image

og:image pointed at the 1200px WebP dialog variant: no declared size,
a 16:9 frame that link previews crop unpredictably, and WebP isn't
rendered by every preview client. The alt text was just the site name.

Photo variants now include <slug>-<hex>-og.jpg, a centre crop to
1200x630, and the head declares its type and size. Migration 013 adds
photo_og so rows built before this keep using the WebP until "Rebuild
resized photos" is run. The alt text names the pictured datacenter and
city. resize and the new og_crop share one convert call.

Assisted-by: Claude:opus-5
This commit is contained in:
Sergei Poljanski 2026-10-10 09:28:57 +04:00
commit 4e074fd4bf
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
6 changed files with 68 additions and 19 deletions

View file

@ -144,7 +144,7 @@ module BingoAdmin
app.post '/admin/bingo/dc/:id/photo/delete' do
dc = Bingo::Datacenter[params[:id].to_i] or halt 404
dc.update(photo_key: nil, photo_variants: false)
dc.update(photo_key: nil, photo_variants: false, photo_og: false)
audit!('bingo.photo_remove', dc.slug)
session[:bingo_flash] = 'Photo removed from card (object kept in bucket).'
redirect "/admin/bingo/dc/#{dc.id}"