Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Og Image

Laravel Og Image Laravel Package

backstage/laravel-og-image

Generate dynamic Open Graph images for your Laravel application. Create social share previews for pages, posts, and products so links stand out on Facebook, X, LinkedIn, and other platforms.

View on GitHub
Deep Wiki
Context7

Generate polished Open Graph images directly from your Laravel app with backstage/laravel-og-image. Define reusable templates, pass in page-specific data, and serve social-ready previews for links shared on X, Facebook, Slack, and beyond—without a separate image service.

  • Blade-based templates for branded, data-driven OG images
  • Simple Laravel routes and helpers for generating image URLs
  • Caching support to keep repeated requests fast
  • Works with standard Open Graph meta tags
  • Configurable sizing and styling for consistent share cards
Frequently asked questions about Laravel Og Image
What is backstage/laravel-og-image and what does it do?
backstage/laravel-og-image is a Laravel-native package for dynamically generating Open Graph images so links to your pages, posts, and products render as polished branded preview cards on social platforms and messaging apps. It exposes a simple API plus customizable templates so each entity can get its own social card. It is intended to sit inside an existing Laravel application rather than run as a standalone service. Treat it as an accelerator for a bounded SEO and social-sharing capability, not core platform infrastructure.
How do I install backstage/laravel-og-image in a Laravel app?
Installation is the usual Composer flow: require the package, publish its config, and define your image templates. You then expose the generation through a route or helper that returns the rendered image. The exact publish tags and route registration details depend on the package's service provider, so check the repository README and config file after publishing. A short spike is the fastest way to confirm the wiring fits your application.
Which Laravel and PHP versions does backstage/laravel-og-image support?
The package is described as Laravel-native, but the context provided does not list explicit Laravel or PHP version constraints. You should verify the Composer require block and CI matrix against your application's PHP and Laravel versions before adopting it. For a Laravel 10, 11, or 12 application, confirm support in staging first. A short technical spike will surface any constraint mismatch quickly.
Does backstage/laravel-og-image use Browsershot, Chromium, GD, or Imagick to render images?
The evaluation does not confirm which rendering backend the package uses, and that is one of the most important things to check. If it relies on headless Chromium or Browsershot, your hosting environment needs Node, Chromium, adequate memory, and installed fonts, which raises operational complexity. If it uses GD or Imagick, integration is simpler but typography and layout fidelity are more limited. Confirm the renderer before you plan deployment.
Can I generate Open Graph images asynchronously or in a queue?
Whether generation can be queued is not confirmed by the available documentation, so verify it during your spike. Synchronous on-request rendering is expensive and risky on a critical path, so queued or pre-generated images are strongly preferred. The recommended pattern is to pre-generate images when content is published and serve them from object storage or a CDN. Keep a static fallback image for any request where rendering fails.
How should I cache dynamically generated OG images in production?
Generated images should be cached aggressively and served from object storage or a CDN rather than rendered on every request. Pre-generating on content publish is the safest strategy for high-traffic pages. Avoid letting the package sit on a critical request path without a static fallback and cache headers. Also consider signed URLs and rate limiting to prevent abuse of any on-demand generation endpoint.
How does backstage/laravel-og-image handle fonts, RTL languages, emoji, and long text?
The context does not document how fonts, RTL scripts, emoji, or long text are handled, so test these explicitly. Font availability and internationalization gaps are common failure modes for dynamic image generation. If your product supports multilingual or RTL content, verify rendering quality and add template logic to truncate or scale long strings. Missing glyphs can silently produce broken preview cards.
Is backstage/laravel-og-image safe to use with user-generated content?
Rendering untrusted text into templates introduces risks around injection, resource exhaustion, and cache poisoning, so sanitize and constrain any user-supplied input. Limit text length, validate values passed into templates, and sign or rate limit public generation endpoints. The evaluation recommends a security review covering input sanitization, URL signing, and abuse cases. Use generated images for non-critical pages first while you validate behavior.
How do I test that my generated OG images work on social platforms?
Pilot on non-critical pages such as blog posts or campaign landing pages, keeping your existing static OG images as the default until you are confident. Compare visual quality, latency, and social validator results against your current images. Check dimensions, file size, and cache behavior against Open Graph and Twitter/X card requirements. Run the images through the platform validators before rolling out to high-value pages.
What are the maintenance and long-term support risks of adopting this package?
Adoption is very low, with around 71 stars and zero dependents, and the apparent release date looks anomalous relative to the current date, which raises maintainer and bus-factor concerns. The MIT license is favorable and lets you fork the code if upstream stalls. The practical mitigation is to wrap the package behind an internal OgImageGenerator interface so it can be replaced or forked without touching product code. Confirm maintainer responsiveness and release history before committing to it.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections