PHPackages                             tlamedia/grabzit-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. tlamedia/grabzit-bundle

ActiveSymfony-bundle[Image &amp; Media](/categories/media)

tlamedia/grabzit-bundle
=======================

The GrabzitBundle integrates the GrabzIt PHP library with Symfony, allowing you to interact with the GrabzIt API in your Symfony projects.

2.1.1(3y ago)31.4k1MITPHPPHP ^7.1 || ^8.0

Since Aug 27Pushed 3y ago2 watchersCompare

[ Source](https://github.com/tlamedia/GrabzitBundle)[ Packagist](https://packagist.org/packages/tlamedia/grabzit-bundle)[ Docs](https://github.com/tlamedia)[ RSS](/packages/tlamedia-grabzit-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (5)Versions (8)Used By (0)

GrabzitBundle
=============

[](#grabzitbundle)

The `GrabzitBundle` integrates the [GrabzIt](https://github.com/GrabzIt/grabzit-php) PHP library with Symfony.

[![Latest Stable Version](https://camo.githubusercontent.com/9c5d16bbf4fb918aff8e64303cc2e38806d271351cc4a7c8ba77d5c4e3c7b4e0/68747470733a2f2f706f7365722e707567782e6f72672f746c616d656469612f677261627a69742d62756e646c652f762f737461626c65)](https://packagist.org/packages/tlamedia/grabzit-bundle)[![Build Status](https://camo.githubusercontent.com/6fa27e62fb4126149c34227906f71ec6ad71a42e6f8e8a56df1efb2ca5d1f73c/68747470733a2f2f6170692e7472617669732d63692e6f72672f746c616d656469612f477261627a697442756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tlamedia/GrabzitBundle)[![License](https://camo.githubusercontent.com/14c26aef32e93dab8f62061b169bc5d566c579aae3dcd9e0455683b3fb4c94aa/68747470733a2f2f706f7365722e707567782e6f72672f746c616d656469612f677261627a69742d62756e646c652f6c6963656e7365)](https://packagist.org/packages/tlamedia/grabzit-bundle)

Installation
------------

[](#installation)

Get the bundlle:

`composer require tlamedia/grabzit-bundle`

Then enable it in your kernel:

```
// config/bundles.php
return [
    //...
    Tla\GrabzitBundle\TlaGrabzitBundle::class => ['all' => true],
    //...
];
```

Configuration
-------------

[](#configuration)

Configure the API key to use:

```
# config.yml
tla_grabzit:
    key: 'Your_Application_Key' # Replace with your own
    secret: 'Your_Application_Secret' # Replace with your own
```

Usage
-----

[](#usage)

The bundle registers the services `tla_grabzit.imageoptions`, `tla_grabzit.pdfoptions`, `tla_grabzit.docxoptions`, `tla_grabzit.animationoptions`, `tla_grabzit.tableoptions` and `tla_grabzit.client`, which allows you to use the GrabzIt API.

### Request a thumbnail from a service

[](#request-a-thumbnail-from-a-service)

```
namespace App\Service;

use Symfony\Component\DependencyInjection\ContainerInterface as Container;

class ThumbnailGenerator
{
    private $container;

    public function __construct(Container $container)
    {
        $this->router = $router;
        $this->container = $container;
    }

    public function generateThumbnail($domain)
    {
        $grabzItHandlerUrl = 'https://www.my-grabzit-thumbnail-site.com/api/thumbmail-ready';

        $options = $this->container->get('tla_grabzit.imageoptions');
        $options->setBrowserWidth(1024);
        $options->setBrowserHeight(768);
        $options->setFormat("png");
        $options->setWidth(320);
        $options->setHeight(240);
        $options->setCustomId($domain);

        $grabzIt = $this->container->get('tla_grabzit.client');
        $grabzIt->URLToImage("http://".$domain, $options);
        $grabzIt->Save($grabzItHandlerUrl);

        try {
            $grabzIt->URLToImage("http://".$domain, $options);
            $grabzIt->Save($grabzItHandlerUrl);
            $result = true;
        } catch (\Throwable $t) {
            $result = false;
        }

        return $result;
    }
}
```

### Recieve thumbnail with GrabzIt handler in a controller

[](#recieve-thumbnail-with-grabzit-handler-in-a-controller)

```
namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class ApiController extends Controller
{
    public function thumbnailReadyAction(Request $request)
    {
        $id = urldecode($request->query->get('id'));
        $customId = $request->query->get('customid');
        $thumbnailFormat = $request->query->get('format');

        if ($id && $customId && $thumbnailFormat) {

            $grabzItApplicationKey = $this->container->getParameter('tla_grabzit.key');

            if (0 === strpos($id, $grabzItApplicationKey)) {

                $grabzIt = $this->container->get('tla_grabzit.client');
                $result = $grabzIt->GetResult($id);

                if ($result) {
                    $rootPath = $this->get('kernel')->getRootDir() . '/../';
                    $thumbnailsPath = $rootPath . 'var/thumbnails/';
                    $fileName = $customId. '.' .$thumbnailFormat;

                    file_put_contents($thumbnailsPath . $fileName, $result);
                } else {
                    throw $this->createNotFoundException('GrabzIt did not return a file');
                }
            } else {
                throw $this->createNotFoundException('Wrong key - Unauthorized access');
            }
        } else {
            throw $this->createNotFoundException('Missing parameters');
        }
        return new Response(null, 200);
    }
}
```

Documentation
-------------

[](#documentation)

Detailed documentation on how to access each API method can be found in the documentation on the [GrabzIt website](https://grabz.it/api/php/)

License
-------

[](#license)

This package is available under the [MIT license](LICENSE).

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~270 days

Recently: every ~381 days

Total

7

Last Release

1191d ago

Major Versions

0.1.0 → 1.0.12018-08-28

1.1.0 → 2.0.02019-06-04

PHP version history (2 changes)0.1.0PHP ^7.0

2.1.0PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f4ceaf6571f8d41950c87969bbe302ae8f7a417b0545eb8a04d2d3027e4090d?d=identicon)[tlamedia](/maintainers/tlamedia)

---

Top Contributors

[![TorbenLundsgaard](https://avatars.githubusercontent.com/u/15211444?v=4)](https://github.com/TorbenLundsgaard "TorbenLundsgaard (15 commits)")[![GrabzIt](https://avatars.githubusercontent.com/u/11035754?v=4)](https://github.com/GrabzIt "GrabzIt (1 commits)")

---

Tags

symfonybundlethumbnailgrabzit

### Embed Badge

![Health badge](/badges/tlamedia-grabzit-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tlamedia-grabzit-bundle/health.svg)](https://phpackages.com/packages/tlamedia-grabzit-bundle)
```

###  Alternatives

[pentatrion/vite-bundle

Vite integration for your Symfony app

2725.3M13](/packages/pentatrion-vite-bundle)[kreait/firebase-bundle

Symfony Bundle for the Firebase Admin SDK

1534.7M2](/packages/kreait-firebase-bundle)[sensiolabs/gotenberg-bundle

A Symfony bundle that provides seamless integration with Gotenberg for generating PDFs and screenshots from various sources (HTML, Markdown, Office documents, URLs) with a clean, builder-based API.

210210.4k2](/packages/sensiolabs-gotenberg-bundle)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[cmsig/seal-symfony-bundle

An integration of CMS-IG SEAL search abstraction into Symfony Framework.

15195.8k5](/packages/cmsig-seal-symfony-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
