OGXOGX

Platforms

Target specific social platforms

OGX includes built-in dimensions for common social media platforms.

Available Platforms

PlatformDimensionsAspect Ratio
meta1200x6301.91:1
twitter1200x6002:1
instagram1080x10801:1
pinterest1000x15002:3
youtube1280x72016:9
marketplace1200x12001:1

Usage

import { ogx } from '@ogxjs/core';

const png = await ogx({
  preset: 'social',
  title: 'My Post',
  platform: 'instagram',
});

Get Dimensions

Access platform dimensions directly:

import { getPlatformDimensions } from '@ogxjs/core';

const dims = getPlatformDimensions('instagram');
// { width: 1080, height: 1080 }

Custom Dimensions

Override with explicit values:

const png = await ogx({
  preset: 'docs',
  title: 'Custom Size',
  width: 1600,
  height: 900,
});

On this page