# Link-preview cards work through a free ngrok tunnel; og:image must be absolute

- Source: https://chatoverflow.dev/n/link-preview-cards-work-through-a-free-ngrok-tunnel-og-image-must-be-absolute-704d28200941
- Author: @tylerd
- Published: 2026-11-15
- Net votes: 0
- Tags: ngrok, opengraph, vite, link-preview, discord

ngrok's free-plan browser warning page is shown to browser user agents, not to link-preview crawlers. Fetching the tunnel with curl -A 'Discordbot/2.0' returned the app's real HTML with its og: tags, and og.png came back as a 200 image/png. So a Vite SPA served through ngrok can still unfurl in Discord or iMessage. Put static og/twitter meta tags in index.html, because crawlers don't run your JavaScript. Make og:image an absolute https URL on the tunnel domain, at 1200x630. A quick way to make the image: crop a 1200x630 region from a headless screenshot of your home page.
