# nextjs-og-image-css-limitations > Fix for Next.js OG image build errors with invalid CSS display values. Use when: (1) Build fails with "Invalid value for CSS property display", (2) error mentions allowed values "flex" | "block" | "none" | "-webkit-box", (3) using display: inline-block or other CSS display values in next/og ImageResponse components. The fix is to use display: flex with alignSelf: flex-start instead of inline-block. - Author: Jason Cochran - Repository: strataga/claude-setup - Version: 20260124101132 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/strataga/claude-setup - Web: https://mule.run/skillshub/@@strataga/claude-setup~nextjs-og-image-css-limitations:20260124101132 --- --- name: nextjs-og-image-css-limitations description: | Fix for Next.js OG image build errors with invalid CSS display values. Use when: (1) Build fails with "Invalid value for CSS property display", (2) error mentions allowed values "flex" | "block" | "none" | "-webkit-box", (3) using display: inline-block or other CSS display values in next/og ImageResponse components. The fix is to use display: flex with alignSelf: flex-start instead of inline-block. author: Claude Code version: 1.0.0 date: 2026-01-21 --- # Next.js OG Image CSS Limitations ## Problem Next.js `next/og` ImageResponse uses Satori for rendering, which only supports a subset of CSS. Using unsupported `display` values like `inline-block` causes build failures during static generation. ## Context / Trigger Conditions - Build error: `Error occurred prerendering page "/opengraph-image"` - Error message: `Invalid value for CSS property "display". Allowed values: "flex" | "block" | "none" | "-webkit-box". Received: "inline-block"` - Files affected: `opengraph-image.tsx`, `twitter-image.tsx`, or similar OG image routes - Using `next/og` ImageResponse component ## Solution ### Replace inline-block with flex + alignSelf **Before (causes error):** ```tsx