Download the PHP package wayborne/dynamic-meta-images without Composer

On this page you can find all versions of the php package wayborne/dynamic-meta-images. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dynamic-meta-images

Dynamic meta images

Dynamic meta images is a Craft CMS plugin that lets you generate dynamic meta images from your website's content.

Requirements

This plugin requires Craft CMS 4.0 or 5.0 or later, and PHP 8.0 or later. Additional requiremens are node, npm and puppeteers.

Installation

You can install this plugin from the Plugin Store or with Composer.

From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “Dynamic meta images”. Then press “Install”.

With Composer

Open your terminal and run the following commands:

Additional steps

Puppeteer

This plugin requires you to install Puppeteer

npm i puppeteer

Node and NPM binary

Create the following enviroment variables in your .env file to point at the Node and NPM binary

Template folder

Create a new folder inside your templates folder (for example _dynamic-meta-images). Inside the plugins ('src/templates/examples`) you can find some example templates showcasing some techniques.

Usage

Dynamic meta images are being created from a twig/html template every time an entry gets saved. The template is rendered in a headless browser and an image is created and saved to a Craft asset sources.

Options

File naming

By default the entry id will be used as file name. You can customize (per template) this by passing a title tag inside your template:

creates a new file:@ title-of-the-entry.png

Styling the template

You can style your templates however you want, however it's important that all of your styling resources (css/fonts/...) have a public url. That means that for local development it's easier to use some an existing CDN:

TailwindCSS

Include the following script to your header:

You can even pass it your local theme to overwrite your defeault:

Fonts

Any public CDN, for example google fonts:

Example templates

You can find some examples in the plugin directory: src/templates/examples/

Together with existing SEO plugins:

SEOmatic

Using SEOmatic's existing api you can set the meta images:

Source

SEO fields

Using SEO fields you can manually set the Facebook and Twitter image:

Source

Troubleshooting

I'm not sure if Puppeteer is installed

Run npm list puppeteer to see if it's listed there. You can also check your package.json file and see if puppeteer is listed under the dependencies and make sure npm install runs without any issues.

I'm having trouble installing Puppeteer on Linux

Following the official Puppeteer docs, here are all the required dependencies for Puppeteer to run on Linux: https://pptr.dev/troubleshooting#chrome-doesnt-launch-on-linux

I can't find the path to my Node or NPM binary

For Node.js: Type which node (macOS/Linux) or where node (Windows) and press Enter. This will display the path to the Node.js binary. For npm: Type which npm (macOS/Linux) or where npm (Windows) and press Enter. This will display the path to the npm binary.

Images aren't being generated:

All image creation is being done in the queue logs so if you experience any issues, that's a good place to check. Make sure that:

To enable Puppeteer Headless Chrome support, add the following line to your /.ddev/config.yaml file:

For Apple Silicon support, you will have to override that configuration by adding a config.m1.yaml file in your ddev folder along with the config.yaml one with the following content:

Brought to you by Wayborne


All versions of dynamic-meta-images with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
craftcms/cms Version ^5.0.0
spatie/browsershot Version ^4.0
spatie/image Version ^3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wayborne/dynamic-meta-images contains the following files

Loading the files please wait ....