Download the PHP package mosaicora/module-opengraph without Composer

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

Mosaicora Open Graph

Open Graph and Twitter Card metadata module for Magento 2, Mage-OS, and Adobe Commerce storefronts.

Mosaicora CDN and JSON-LD

Mosaicora is an optional integration that generates social-preview images from your storefront pages and serves them through the Mosaicora CDN. When it isn't enabled, the module continues using its normal Open Graph image handling.

To enable it, create a Mosaicora.io account, create a site in the Mosaicora Dashboard, then enter that site's ID at Stores > Configuration > Mosaicora > Open Graph.

JSON-LD mappings provide image-generation hints and are active only when Mosaicora is enabled.

See the Advanced Configuration documentation for supported Mosaicora JSON-LD semantic roles and mapping values.

mosaicora/module-opengraph gives product, category, CMS, and home pages the metadata that social platforms need to generate clean share previews. It works out of the box with sensible defaults, while still giving store teams per-store control over titles, descriptions, images, and generated social-preview image sizes.

Live Demo

A Magento demo shop configured with this module is available at https://demo-shop-magento.mosaicora.io/.

Use the free Mosaicora Open Graph Checker at https://mosaicora.io/tools/open-graph-checker to inspect the shop's Open Graph tags and preview how its pages will appear when shared. Try these ready-made examples:

Why Use It

Supported Pages

The module resolves the active storefront context and applies metadata during layout generation.

Requirements

Installation

Install the package through Composer:

Run the normal Magento upgrade and cache workflow:

For production-mode deployments, also regenerate dependency injection and static content according to the store's deployment process:

Install dependencies from the Magento project root. Do not run composer install inside a module directory mounted or symlinked into Magento because a nested vendor/ tree causes duplicate class loading during compilation.

Configuration

The module adds a configuration section at:

Stores > Configuration > Mosaicora > Open Graph

Configuration is store-scoped where Magento allows it, so each store view can use its own site name, default image, metadata source attributes, and image optimization settings.

General

Remove Competing Social Tags is disabled by default. When enabled, Mosaicora removes duplicate Open Graph, product, and enabled Twitter Card tags for metadata keys that this module generates, so Mosaicora's values win.

Image Optimization

Image optimization is enabled by default and uses 1200x630, the common Open Graph share-card aspect ratio. Local Magento media images can be converted into cached social-preview images. External image URLs are left unchanged.

Content Defaults

Individual products, categories, and CMS pages can also provide Open Graph-specific values when the module attributes or fields are available.

Metadata Output

The module can output:

Product pages may also output:

Twitter tags are copied from the resolved Open Graph values when Twitter Card output is enabled.

Duplicate Social Tags

Magento, themes, and third-party extensions may emit their own Open Graph or Twitter Card tags. The preferred setup is to disable that output in the other module or theme so only one metadata provider remains active.

If the competing output cannot be disabled, enable Remove Competing Social Tags under Stores > Configuration > Mosaicora > Open Graph > General. The switch is off by default for compatibility. When enabled, it removes competing tags only for metadata keys generated by Mosaicora and keeps unrelated tags.

Metadata API

The module exposes anonymous read-only metadata endpoints intended for preview tooling and integrations:

These endpoints return the same resolved tags that frontend pages use. They do not expose private catalog data, but they are intentionally public.

Send Magento's standard Store request header to resolve metadata for a specific store view.

GraphQL

GraphQL exposes the same metadata on Magento's native storefront types:

The tags field uses the same flexible name and content list returned by REST, including Open Graph, Twitter Card, and product metadata.

Disabled configuration returns enabled: false and an empty tags list. REST and GraphQL use the same normalized tag builders and storefront canonical URLs.

Default Resolution

Out of the box, the module uses these fallbacks:

Text values are sanitized before output and truncated when needed.

Images

Product images are resolved from the configured product image attribute and then through the default fallback list until a usable image is found.

Category images can use the category image automatically or a custom og_image_custom category attribute.

CMS pages can use the configured default image or a custom uploaded image stored in og_image_custom.

Only normalized paths under Magento media are used for local image optimization. Remote URLs are emitted unchanged and are never used for filesystem reads or generated cache files.

When image optimization is enabled, generated images are cached in:

pub/media/mosaicora/opengraph/cache

The cache key accounts for the source file, source modification time, target dimensions, and resize mode. Authorized admin users can clear generated Open Graph images from the Magento cache management screen.

Admin Fields

The installation patches add these product attributes:

The installation patches add these category attributes:

CMS pages receive matching Open Graph fields through the admin UI component.

Admin Permissions

The module adds permissions for configuration access and generated image cache management:

Development

When the module is mounted in Magento, run checks with the parent dependency tree:

For a standalone clone outside Magento, configure auth.json for repo.magento.com, run composer install, then use composer phpcs and composer test.

CI validates the package on PHP 8.1 and PHP 8.5. Pull requests from forks do not receive Magento repository credentials. Maintainers rerun reviewed changes from a trusted repository branch.

Project Links

License

GPL-3.0-or-later

Maintainer

Built and maintained by Mosaicora.io.

Mosaicora automatically creates stunning Open Graph images from your web pages using beautiful, customizable templates. No design tools or uploads needed.


All versions of module-opengraph with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0||~8.2.0||~8.3.0||~8.4.0||~8.5.0
magento/framework Version ^103.0
magento/module-backend Version ^102.0
magento/module-catalog Version ^104.0
magento/module-catalog-graph-ql Version ^100.4
magento/module-cms Version ^104.0
magento/module-cms-graph-ql Version ^100.4
magento/module-config Version ^101.2
magento/module-eav Version ^102.1
magento/module-graph-ql Version ^100.4
magento/module-store Version ^101.1
magento/module-store-graph-ql Version ^100.4
magento/module-ui Version ^101.2
magento/module-webapi Version ^100.4
mosaicora/plugin-core-php Version ^1.0
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 mosaicora/module-opengraph contains the following files

Loading the files please wait ...