JA EN

OGP Image Optimal Sizes and Creation Guide - Platform-Specific Recommendations

· 9 min read

What are OGP Images - Thumbnails That Drive Social Sharing

OGP (Open Graph Protocol) images are thumbnail previews displayed when web pages are shared on social media. Established by Facebook in 2010, the protocol is now supported by Twitter/X, LINE, Slack, Discord, LinkedIn, and many other platforms. When users post links, platforms parse the destination HTML and retrieve image URLs from OGP meta tags for display.

OGP images are specified using HTML <meta> tags:

Setting appropriate OGP images significantly improves click-through rates (CTR) on social media. According to BuzzSumo research, links with images achieve 2.3x more engagement compared to those without. Conversely, missing or improperly sized OGP images result in unattractive auto-generated previews (small cards with just a favicon), dramatically reducing click rates.

Recommended Sizes by Platform - Optimal Solutions Per Platform

Each social platform displays OGP images differently, so optimal sizes vary. However, 1200x630px (aspect ratio 1.91:1) is recommended as a universal size that works across all platforms. Preparing this single size ensures proper display on all major social networks.

Keep file size under 1MB. Files exceeding 5MB may fail to load on some platforms. PNG or JPEG formats are safe - WebP may not be supported on some platforms (particularly LINE).

Design Principles for Effective OGP Images

OGP images compete with other posts in social media timelines, requiring designs that communicate content instantly. Users scroll timelines rapidly, spending only 1-2 seconds per post. Following these principles creates high-CTR OGP images:

Patterns to avoid: images with text too small, overloaded with information, or low contrast between background and text. Always verify readability at mobile display sizes (approximately 300px width).

Automated OGP Image Generation - Programmatic Approaches

For sites with many articles, manually creating OGP images one by one is impractical. Building template-based auto-generation systems efficiently produces consistent-quality OGP images at scale.

Node.js + Canvas (node-canvas / @napi-rs/canvas): Generate images server-side using Canvas API. Define templates (background image + text placement rules) and dynamically generate based on article titles and categories. Japanese font rendering requires pre-loading font files like Noto Sans JP. Implementing auto-wrapping and auto-sizing logic handles long titles.

Puppeteer / Playwright HTML rendering: Render HTML+CSS designed templates in headless browsers, capturing as screenshot images. Leverages CSS layout capabilities (Flexbox, Grid) for high design flexibility. Vercel's og-image service uses this approach. Slower than Canvas (1-3 seconds per image) but fine when pre-generating at build time.

Satori + Resvg (Vercel OG): Converts React components to SVG, then rasterizes to PNG. Available via Next.js @vercel/og package, generating OGP images dynamically on Edge Runtime. Writing designs in JSX makes it familiar for frontend developers.

Implementation and Debugging - Fixing Display Issues

Proper OGP implementation requires placing appropriate meta tags in HTML <head> and verifying display with each platform's validator. Implementation mistakes and configuration oversights are extremely common, making pre-publication debugging essential.

Required meta tags:

Debugging tools:

After updating OGP images, platform caches prevent immediate reflection. Re-scrape with debuggers or append query parameters (?v=2) to bypass cache. Cache duration varies: Facebook ~7 days, Twitter ~7 days, LINE ~1 day.

Common OGP Problems and Solutions

Summary of frequently encountered OGP image problems and solutions. These issues trip up experienced developers, not just beginners.

Related Articles

Image Resizing Best Practices - Aspect Ratio and Interpolation Algorithms

Learn about maintaining aspect ratio, choosing interpolation algorithms, and recommended sizes for different use cases when resizing images for web, print, and social media.

Image Format Comparison - JPEG/PNG/WebP/AVIF/GIF/BMP Features and Use Cases

Compare technical characteristics of 6 major image formats. Organized comparison of compression methods, color depth, transparency, animation, and browser support with optimal format selection by use case.

Recommended Image Formats and Sizes for Each Social Media Platform

A comprehensive guide to recommended image sizes, formats, and aspect ratios for X, Instagram, Facebook, LINE, and other major platforms.

Complete Guide to Image Caching Strategies - Cache-Control, ETag, and CDN Configuration

Learn how to accelerate web image delivery with Cache-Control, ETag, and CDN caching. Covers cache invalidation strategies and versioning implementation patterns with practical examples.

Image Gallery Performance Optimization - Techniques for Fast Display of Large Collections

Optimize performance for gallery pages with hundreds of images. Covers virtual scrolling, progressive loading, memory management, and efficient layout calculation with practical implementations.

Image Placeholder Techniques Compared - LQIP, BlurHash, and SQIP Implementation Guide

Compare LQIP, BlurHash, and SQIP techniques for improving user experience during image loading. Learn the pros, cons, and optimal use cases for each placeholder method.

Related Terms