Download the PHP package mauricerenck/ogimage without Composer

On this page you can find all versions of the php package mauricerenck/ogimage. 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 ogimage

OG Image

A Kirby OpenGraph Image Plugin

GitHub release License Kirby Version


This plugin creates an og-image for a page, based on a template image and a text input. Simply add /og-image to any url to get the og-image for that page.

Installation

Use one of these methods to install the plugin:

Prerequisites

This plugin requires the following assets to be present:

You can find a sample template image in the assets folder of this plugin.

How it works

This plugins listens to /og-image on any page. It will go through the following steps:

  1. Check if the page has a ogimage field - If you have an ogimage field, the plugin will use the image from that field and deliver it as the og-image.
  2. Check if the page has a hero image - If you have a hero image, the plugin can use that image and place it under the template image.
  3. Use the template image and place text on it.

You can configure the position of the text, and the hero image, even crop it to position it below transparent areas of your template image.

In your template

Add the following meta tags to your HTML <head> tag:

In your config

Given you have True Type Font and a template image, you want to add a text to, you can configure the plugin in your config.php. Let say you have a transparent area in your template which should be filled with the hero image of your page. Let's also say, you want to fill that transparent area with a color if no hero image is set:

Options

Please make sure to prefix all the options with mauricerenck.ogimage..

Option Default Description
width 1600 width of the resulting og-image
height 900 height of the resulting og-image
field 'ogImage' field for manualy setting an image
image.template ./../assets/template.png path to your og-image template image
font.path '' mandatory (missing font will result in an error)
font.color [0, 0, 0] color of the font [r,g,b]
font.size 80 size of the font
heroImage.field hero path to your og-image template image
heroImage.cropSize [600, 600] Size in pixels of the rendered hero image
heroImage.position [0,0] x,y position of the hero image on the template image
heroImage.fallbackColor [255, 123, 123] [r,g,b] color to fill the hero-image area if no image given
heroImage.fallbackImage null path to a fallback when the hero image is not given
title.field title The name of the field your want to use as title
title.position [0, 0] [x,y] position of your text
title.charactersPerLine 20 Number of characters before a line break

All versions of ogimage with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2.0
getkirby/composer-installer Version ^1.2
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 mauricerenck/ogimage contains the following files

Loading the files please wait ....