Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteAdd Open Graph tags to the shared Blade layout inside its <head>, then provide page-specific titles, descriptions, canonical URLs, and images from each view or controller. Use Blade’s escaped output for dynamic values, and inspect the rendered HTML to verify the tags are present.
Which Open Graph tags should a Laravel page include?
The Open Graph protocol’s four basic properties are og:title, og:type, og:image, and og:url. Add og:description for a useful summary, and og:site_name when appropriate. The Open Graph protocol describes the fields and their meaning.
As an Amazon Associate I earn from qualifying purchases.
og:title: the title to represent the page.og:type: the object type, such aswebsiteorarticle.og:url: the canonical URL identifying that page.og:image: the URL of the image representing it.og:description: a concise description.og:image:alt: a description of the image, not a caption. If you specifyog:image, the protocol says to specify this field as well.
Use public, absolute URLs for the page and image so a remote preview crawler can request them. This is practical guidance for URL-valued metadata; the protocol does not prescribe a Laravel-specific hosting setup.
Add the tags to a shared Blade layout
Laravel views commonly live under resources/views. In a typical application, place the tags in the shared layout—for example, resources/views/layouts/app.blade.php—so each page using that layout emits metadata in its document head.
#1 Best Overall
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<title>@yield('title', config('app.name'))</title>
<meta property="og:title" content="@yield('og_title', config('app.name'))">
<meta property="og:type" content="@yield('og_type', 'website')">
<meta property="og:url" content="@yield('og_url', url()->current())">
<meta property="og:description" content="@yield('og_description', '')">
<meta property="og:image" content="@yield('og_image', asset('images/social-default.jpg'))">
<meta property="og:image:alt" content="@yield('og_image_alt', '')">
</head>
<body>
@yield('content')
</body>
</html>
Replace the example default image path with an image that exists and is publicly reachable. The fallback title and type are useful defaults, but page-specific values should override them for content pages.
Set metadata for each page
A child Blade view can supply sections for the layout. This example assumes the route is named posts.show and the post has the referenced fields; adapt those names to your application.
@extends('layouts.app')
@section('title', $post->title)
@section('og_title', $post->social_title ?: $post->title)
@section('og_type', 'article')
@section('og_url', route('posts.show', $post))
@section('og_description', $post->meta_description ?: Str::limit(strip_tags($post->body), 200))
@section('og_image', $post->social_image_url)
@section('og_image_alt', $post->social_image_alt ?: $post->title)
@section('content')
<article>
<h1>{{ $post->title }}</h1>
{!! $post->body !!}
</article>
@endsection
The og:url should identify the canonical page URL, rather than a temporary or tracking URL. Confirm the route name and generated URL are correct for the deployed site.
Free tools Windows power users keep installed
One-click scans. No signup required.
Pass values from a controller instead
If you prefer to assemble page metadata in a controller, Laravel’s view helper accepts data alongside the view name:
Rank #3
public function show(Post $post)
{
return view('posts.show', [
'post' => $post,
'ogTitle' => $post->social_title ?: $post->title,
'ogDescription' => $post->meta_description,
'ogUrl' => route('posts.show', $post),
'ogImage' => $post->social_image_url,
'ogImageAlt' => $post->social_image_alt ?: $post->title,
]);
}
Then have the view expose those values to the shared layout, either through sections or an include. See Laravel’s documentation for views and passing data to views and Blade templates.
Keep dynamic metadata safely escaped
Use Blade’s escaped {{ }} interpolation for titles, descriptions, image URLs, and alt text. Laravel documents that these echo statements are passed through PHP’s htmlspecialchars function to help prevent cross-site scripting (XSS). Avoid {!! !!} for metadata or other user-provided values. The body example uses unescaped output only as a separate content-rendering choice; sanitize user-entered HTML according to your application’s requirements before rendering it that way.
Include useful image metadata
The protocol supports additional image properties: og:image:secure_url, og:image:type, og:image:width, og:image:height, and og:image:alt. Add details that are accurate for the image you serve. If you emit multiple og:image values, the protocol prefers the first in case of conflicting values; put structured image fields after the corresponding image tag.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Other optional properties include og:determiner, og:locale, and og:site_name. Do not add values just to fill out the head: choose those that accurately describe the page.
Best Value
When Laravel Head may be a better fit
For a small site, direct Blade markup is straightforward and keeps the emitted HTML visible in the layout. If you need shared defaults, page-specific runtime metadata, field-level precedence, or integrations for Blade, Livewire, and Inertia, Laravel’s Laravel Head documentation describes a structured package approach. Check its guidance against your installed Laravel release before adopting it.
Install and define defaults
composer require laravel/head
A typical setup defines defaults in a service provider, then sets metadata while loading an individual page:
use LaravelHeadEnumsOgType;
use LaravelHeadFacadesHead;
use LaravelHeadHeadBuilder;
// In a service provider boot method:
Head::defaults(fn (HeadBuilder $head) => $head
->title(config('app.name'))
->description('')
->og(siteName: config('app.name'), type: OgType::Website));
// In a controller action for one post:
Head::title($post->title)
->description($post->meta_description)
->og(type: OgType::Article, title: $post->title)
->ogImage($post->social_image_url, alt: $post->social_image_alt ?: $post->title);
return view('posts.show', ['post' => $post]);
Render the resolved metadata in the shared layout:
<head>
<meta charset="utf-8">
@head
</head>
Laravel Head resolves defaults, route metadata, runtime metadata, and error metadata in precedence order, replacing lower-level values field by field. Its @head directive renders synchronously, so define the page metadata before the layout is rendered.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Verify the rendered page, not just the template
- Open a representative page in a browser and inspect its document source or response HTML.
- Check that all expected
og:tags appear inside<head>, not only in client-side code that may not be present in the server response. - Confirm the page-specific title, type, canonical URL, description, image URL, and image alt text are correct.
- Check that the referenced image and page URL are publicly reachable and that the image URL points to the intended asset.
- Use the current preview or debugging tool for the particular social platform if you need to check what it has fetched. Presence in the HTML does not establish that a platform has fetched or refreshed the metadata.
Common implementation problems
- The shared layout shows defaults on every page: confirm the child view extends the expected layout and defines the metadata sections, or that the controller’s metadata setup runs before rendering.
- The preview has no image: check that the rendered
og:imageis an absolute, publicly accessible URL and thatog:image:altis also emitted. A tag in a template is not proof that a particular platform fetched the image. - The URL points to the wrong page: generate it from the intended canonical route and inspect the actual response. Avoid relying on a current request URL if it can include query parameters or otherwise differ from the canonical address.
- Metadata contains unexpected characters or markup: use escaped Blade output and keep HTML out of metadata values.
- Laravel Head tags are missing or stale: because
@headrenders synchronously, define the metadata before the layout is rendered and check the package API against your Laravel version. - A platform still shows an old or different preview: the HTML check confirms only what your server returns. Platform cache expiry and debugger behavior vary and are not established here; consult the current tooling for the target platform.
Or skip the browser setup
You can inspect a page’s rendered screenshot with ScreenshotNeo, a website screenshot API and MCP server for developers. It does not replace checking the HTML source when you need to verify exact metadata, but it can help review how the page renders.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/posts/example -o shot.webp
See the ScreenshotNeo documentation for API details. ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The Free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000.
Sign up for 1,000 free screenshots a month, with no card required.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




