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:
parent
cb2eba1a26
commit
4e074fd4bf
6 changed files with 68 additions and 19 deletions
|
|
@ -1,6 +1,7 @@
|
|||
<% base = base_url %>
|
||||
<% desc = format(t(:seo_desc), hit: @board.hit.count(true), total: @board.cells.size) %>
|
||||
<% og_img = og_photo(@board) %>
|
||||
<% og = og_dc(@board) %>
|
||||
<% og_img = og && "#{base}/p/#{og.og_file}" %>
|
||||
<!doctype html>
|
||||
<html lang="<%= @locale %>">
|
||||
<head>
|
||||
|
|
@ -27,7 +28,12 @@
|
|||
<% end %>
|
||||
<% if og_img %>
|
||||
<meta property="og:image" content="<%= og_img %>">
|
||||
<meta property="og:image:alt" content="<%= t(:title) %>">
|
||||
<% if og.photo_og %>
|
||||
<meta property="og:image:type" content="image/jpeg">
|
||||
<meta property="og:image:width" content="<%= Bingo::Photo::OG_SIZE[0] %>">
|
||||
<meta property="og:image:height" content="<%= Bingo::Photo::OG_SIZE[1] %>">
|
||||
<% end %>
|
||||
<meta property="og:image:alt" content="<%= og.l(:name, @locale) %>, <%= og.l(:city, @locale) %>">
|
||||
<meta name="twitter:image" content="<%= og_img %>">
|
||||
<% end %>
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue