Requirements
Dynamic OG Images based onspatie/browsershot package and puppeteer package. You need to install these packages first.
(You can skip this step if you already installed these packages, packages included in Larafast by default)
Configuration
Modify theresources/views/seo/image.blade.php file to create your own dynamic OG Image template.
Usage
To have your og image generated dynamically, you need to use following route:your-title.jpg file name. If the file already exists, it will not generate a new image.
Example
@include('seo') in your layout file, you can use the following inside controllers:
If you need to reset your open graph images cache in Twitter use https://cards-dev.twitter.com/validator or add ?v1=true after your url for which you want to reset it
Digging deeper
The first load of dynamic og image will be slow, as it will be generated on the fly. After that, generated image will be picked instead of creating new one.Articles or other models with image
For every new article that you create or update, og image will be generated automatically. The logic handled inapp/Observers/ArticleObserver.php file.
If you have existing articles, or if you modified the template and want to regenerated model og images, you can use the following command:

