This project is a simple Open Graph image generator, it allows you to generate Open Graph images for a given URL.
- Symfony CLI
- Docker and Docker Compose
- PHP 8.3
- Clone the repository and configure the environment:
git clone https://github.com/Kocal/open-graph-image-generator.git
cd open-graph-image-generator
symfony local:server:ca:install
symfony local:proxy:domain:attach og-image-generator
-
Edit the
.env.local
and configureAPP_OPENGRAPH_IMAGE_GENERATION_ALLOWED_DOMAINS
to allow your domain(s) to generate Open Graph images. -
Install the dependencies with Composer:
$ symfony composer install
Run the project:
$ docker compose up -d
$ symfony serve
You can use this project programmatically by sending a GET
request to the /generate
endpoint with the following parameters:
format
(required): The image format, can behtml
orimage
url
(required): The URL to generate the Open Graph image