Generating Localised Open Graph Images per Language at Build Time
Shared multilingual pages often display English preview images on platforms like LinkedIn, WhatsApp and Slack, which can look careless and reduce click-through. The article proposes creating localised Open Graph images at build time using a single SVG template with placeholders for translated titles and taglines, rendered to 1200×630 PNGs per locale. It notes that scripts such as Chinese, Japanese, Korean, Arabic and Thai require explicit Noto fonts on the build machine to avoid empty boxes, and that right-to-left languages may need mirrored layouts. Long German titles and unspaced CJK text call for adjusted font sizes and line breaks, and each locale page should reference its own image alongside consistent hreflang and canonical tags. Because social platforms cache previews aggressively, the author suggests adding content hashes to filenames when titles change and refreshing previews with each platform's debugging tool.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in