How to create Dynamic OG Images for your Larafast application
spatie/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)
resources/views/seo/image.blade.php
file to create your own dynamic OG Image template.
your-title.jpg
file name. If the file already exists, it will not generate a new image.
@include('seo')
in your layout file, you can use the following inside controllers:
app/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:
generate:og-images
command to include your models.