Back to all

nextjs-og-image-css-limitations

by Jason Cochran

00Feb 6, 2026Visit Source
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.