Download the PHP package abordage/og-images without Composer

On this page you can find all versions of the php package abordage/og-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 og-images

Open Graph Images Generator

Create Open Graph images (og:image, twitter:image, vk:image) for each (or some) site pages.

Open Graph Images Generator

Packagist Version GitHub Tests Status GitHub Code Style Status Packagist PHP Version Support License

Use page title to create an eye-catching page preview when users share the link on social networks or instant messengers. Learn more about Open Graph.

Features:

See examples

Requirements

Installation

You can install the package via composer:

💡 Using Laravel? Check out abordage/laravel-og-images

Quick start

Note
All images are encoded in PNG format as it provides the best ratio between size/quality. For the same reason, the package uses the Imagick driver - in tests, it showed an advantage in speed and final size of the generated images.

Usage

After generation, you need to somehow organize the relationship of images with a specific page (for example, attach to a model). If you already have a solution ready to accept an image and attach it to a specific page, you can get the image as a string instead of saving it:

If after generation you need to get sizes of the image, you can get it as follows:

Configuration

API Reference

Method Returns Added in Changed in
make(string $text, string $preset = 'opengraph') self 0.1.0 0.2.0
makeCustom(string $text, int $width, int $height) self 0.2.0 -
get() string 0.1.0 -
save(string $path) boolean 0.1.0 -
getImageSizes() array 0.3.0 -

Images aspect ratios

Preset Aspect ratios Docs
make(string $text) 1200 x 630 (1.91:1)
make(string $text, 'opengraph') 1200 x 630 (1.91:1)
make(string $text, 'facebook') 1200 x 630 (1.91:1) fb
make(string $text, 'twitter') 1200 x 600 (2:1) twitter
make(string $text, 'vk') 1200 x 536 (2.2:1) vk

Roadmap

Add ability to use gradients and images for the background.

Testing

Run all tests

or

or see https://github.com/abordage/og-images/actions/workflows/tests.yml

Feedback

Find a bug or have a feature request? Open an issue, or better yet, submit a pull request - contribution welcome!

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of og-images with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-imagick Version *
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 abordage/og-images contains the following files

Loading the files please wait ....