Generate Images from Pages

I want to create something like in the image, but with Code and not in Photoshop. I want to publish funny sentences about the life in the village. It should be searchable for google, but also shareable for the people. There is a overview page and a detailpage foreach sentence.

It is possible to share this page with his friends and social media (like in a normal blogpost). But when he / she clicks on a button called “Download or Share”, then the page will be transform to generated image and the user downloads this (not the page as code).

Do you have a solution for this?

Example Image:

Content Structure

    |-- dorfkindmoment.txt
    |-- image.jpg
    |-- dorfkindmoment.txt
    |-- image.jpg
    |-- dorfkindmoment.txt
    |-- image.jpg


Title: Das Stockbrot ist das Knoppers vom Dorf.


Category: Gemeinschaft


Tags: Lagerfeuer 


<?= $page->title() ?>
<?= $page->image() ?>


Pretty sure this is possible, google “HTML to image” or “DOM to image” and I’m sure you’ll find some library to help you with this.