PHPackages                             josefglatz/cropvariantsbuilder - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. josefglatz/cropvariantsbuilder

ActiveTypo3-cms-extension[Utility &amp; Helpers](/categories/utility)

josefglatz/cropvariantsbuilder
==============================

Simplify writing cropVariants for TYPO3 Integrators/Developers

3.0.2(4mo ago)724.4k↓56.3%6[4 issues](https://github.com/josefglatz/cropvariantsbuilder/issues)GPL-2.0-or-laterPHPPHP &gt;=8.2.0

Since Jan 12Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/josefglatz/cropvariantsbuilder)[ Packagist](https://packagist.org/packages/josefglatz/cropvariantsbuilder)[ RSS](/packages/josefglatz-cropvariantsbuilder/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (1)Versions (11)Used By (0)

josefglatz/cropvariantsbuilder (TYPO3 Extension `cropvariantsbuilder`)
======================================================================

[](#josefglatzcropvariantsbuilder-typo3-extension-cropvariantsbuilder)

> TYPO3 extension to simplify writing cropVariants for TYPO3 Integrators/Developers

---

 → → → Table of Contents1. → [About](#about)
    1. [Past](#past)
    2. [Present](#present)
    3. [Future](#future)
2. → [Installation](#installation)
    1. [Installation using Composer](#installation-using-composer)
    2. [Installation as extension from TYPO3 Extension Repository (TER)](#installation-as-extension-from-typo3-extension-repository-ter)
3. → [Configuration](#configuration)
    1. [Name of the extension where the general configuration file lives](#name-of-the-extension-where-the-general-configuration-file-lives)
    2. [Example of using your own CropVariants.yaml file](#example-of-using-your-own-cropvariantsyaml-file)
    3. [Example of using your own CropVariants.yaml file while using the \\TYPO3\\CMS\\Core\\Configuration\\Loader\\YamlFileLoader-&gt;load() imports feature](#example-of-using-your-own-cropvariantsyaml-file-while-using-the-typo3cmscoreconfigurationloaderyamlfileloader-load-imports-feature)
4. → [Detailed manual and more examples](#detailed-manual-and-more-examples)
    1. [Handling of cropVariants in TYPO3](Resources/LegacyDocumentation/Markdown/Images/Index.md#handling-of-cropvariants-in-typo3)
        1. [Centralized configuration for AspectRatio, Cover-/CropArea presets and CropVariant definitions](Resources/LegacyDocumentation/Markdown/Images/Index.md#centralized-configuration-for-aspectratio-cover-croparea-presets-and-cropvariant-definitions)
        2. [Handling of cropVariants in TYPO3: Simplified cropVariants configuration for the Table Configuration Array](Resources/LegacyDocumentation/Markdown/Images/Index.md#simplified-cropvariants-configuration-for-the-table-configuration-array)
    2. [Defaults And Presets](Resources/LegacyDocumentation/Markdown/Images/DefaultsAndPresets.md)
    3. [CropVariantsBuilder](Resources/LegacyDocumentation/Markdown/Images/CropVariantsBuilder.md)
        1. [Example 1: Set a global default cropVariants configuration](Resources/LegacyDocumentation/Markdown/Images/CropVariantsBuilder.md#example-1-set-a-global-default-cropvariants-configuration)
        2. [Example 2: Set custom cropVariants for a specific field of a specific table (pages.tx\_my\_nice\_site\_extension\_nav\_image)](Resources/LegacyDocumentation/Markdown/Images/CropVariantsBuilder.md#example-2-set-custom-cropvariants-for-a-specific-field-of-a-specific-table-pagestx_my_nice_site_extension_nav_image)
        3. [Example 3: Set custom cropVariants for tx\_news\_domain\_model\_news.fal\_media](Resources/LegacyDocumentation/Markdown/Images/CropVariantsBuilder.md#example-3-set-custom-cropvariants-for-tx_news_domain_model_newsfal_media)
        4. [Example 4: Set custom cropVariants for `tt_content.image` for CType `tx_my_nice_site_extension_custom_ce1`](Resources/LegacyDocumentation/Markdown/Images/CropVariantsBuilder.md#example-4-set-custom-cropvariants-for-tt_contentimage-for-ctype-tx_my_nice_site_extension_custom_ce1)
    4. [Translation logic for cropVariant label](Resources/LegacyDocumentation/Markdown/Images/TranslationLogic.md)

---

About
-----

[](#about)

This extensions centralizes the configuration of

- default aspectRatios,
- aspectRatios used within the TYPO3 instance,
- coverAreas used within the TYPO3 instance,
- cropAreas used within the TYPO3 instance,
- focusAreas used within the TYPO3 instance.

This extension makes it easy to configure cropVariants within TCA (`EXT:your_ext/Configuration/TCA/**/*.php`) modifications in your "site package" extension.

> ***The extension relies 100% on the TYPO3 core functionality*** and can be seen as an on-top-time-saver for TYPO3 integrators.

### Past

[](#past)

The initial public version was part of `https://github.com/josefglatz/TYPO3-Distribution`. The demands grew in 2019 and therefore I came up with a new idea to support also the TYPO3 site configuration which was introduced in TYPO3 9.5 LTS.

### Present

[](#present)

This extension doesn't support the TYPO3 site configuration. With that known fact, it's not possible to distinguish between multiple sites in a multitree environment.

### Future

[](#future)

The functionality of this extension will stay as it is. There will be no direct successor to which you can update and migrate automatically (from my current perspective). I will link the new extension here when it's publicly available.

At the time of writing about the future my plan is to re-adding the functionality completely via the TYPO3 site configuration and the FormDataProvider. With that in mind, it's possible to make site specific configurations. Even the configuration can be done completely via a YAML file beside your existing YAML file of one configured site.

If it makes really sense, I probably add also the functionality of `EXT:cropvariantsbuilder` to make global TCA modifications possible (not yet specified if you have to write YAML or the known PHP syntax).

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

[](#installation)

### Installation using Composer

[](#installation-using-composer)

The recommended way to install the extension is by using [Composer](https://getcomposer.org/). In your Composer based TYPO3 project root, just do `composer require josefglatz/cropvariantsbuilder`.

### Installation as extension from TYPO3 Extension Repository (TER)

[](#installation-as-extension-from-typo3-extension-repository-ter)

Download and install the extension with the TYPO3 CMS extension manager module or directly via [typo3.org](https://typo3.org/extensions/repository/view/cropvariantsbuilder).

### Version Matrix

[](#version-matrix)

TYPO3 versionExtension versionnotes8.7-10.4`1.0.1`no breaking changes10.4-11.5`1.0.3`no breaking changes11.5-12.4`>=2.0.0`translation fallback logic removed13.4`>=2.0.1`no breaking changes since 2.0.014.1`>=3.0.1`no breaking changes since 2.0.0---

Development
-----------

[](#development)

> The ongoing development is done within the main branch!

You can use `composer require josefglatz/cropvariantsbuilder:dev-main` if you want to test the current development state.

---

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

[](#configuration)

### Name of the extension where the general configuration file lives

[](#name-of-the-extension-where-the-general-configuration-file-lives)

The following options must be set within the TYPO3 extension configuration:

```
configurationProviderExtension = my_nice_site_extension

```

> *So if you place the configuration file in `EXT:my_nice_site_extension/Configuration/ImageManipulation/CropVariants.yaml`you have to set the value to `my_nice_site_extension`.*

```
configurationProviderLocallangFilename = locallang

```

> *So if you place the translations in `EXT:my_nice_site_extension/Resources/Private/Language/locallang.xlf`you have to set the value to `locallang`.* Read more about the supported [translation logic](Resources/LegacyDocumentation/Markdown/Images/TranslationLogic.md).

The following example shows the resulting PHP configuration part:

```
// TYPO3 >= 9.5 LTS:
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['cropvariantsbuilder'] = [
    'configurationProviderExtension' => 'my_nice_site_extension',
    'configurationProviderLocallangFilename' => 'locallang',
];

// TYPO3 =< 8.7 LTS
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['cropvariantsbuilder'] = serialize([
    'configurationProviderExtension' => 'my_nice_site_extension',
    'configurationProviderLocallangFilename' => 'locallang',
]);
```

### Example of using your own CropVariants.yaml file

[](#example-of-using-your-own-cropvariantsyaml-file)

Just clone the file `EXT:cropvariantsbuilder/Configuration/ImageManipulation/CropVariants.yaml`to `EXT:my_nice_site_extension/Configuration/ImageManipulation/CropVariants.yaml`and modify it however you want. With that approach, you have no dependencies on the default CropVariants.yaml of `EXT:cropvariantsbuilder`.

### Example of using your own CropVariants.yaml file while using the `\TYPO3\CMS\Core\Configuration\Loader\YamlFileLoader->load()` imports feature

[](#example-of-using-your-own-cropvariantsyaml-file-while-using-the-typo3cmscoreconfigurationloaderyamlfileloader-load-imports-feature)

> The following example represents the content of the file `EXT:my_nice_site_extension/Configuration/ImageManipulation/CropVariants.yaml`.

```
imageManipulation:
  cropVariants:
    defaults:
      aspectRatios:
        "1.91:1":
          title: "This is the new title for an existing aspectRatio within EXT:cropvariantsbuilder"
        "123:321":
          title: "Completely new introduced aspect ratio"
          value: 123 / 321

      defaultCropVariantsConfiguration:
        default:
          aspectRatios:
            - "3:2"
            - "2:3"
            - "123:321"
            - "NaN"

imports:
  -
    resource: 'EXT:cropvariantsbuilder/Configuration/ImageManipulation/CropVariants.yaml'

```

You can rely on the default CropVariants.yaml of `EXT:cropvariantsbuilder` while modifying it to meet the demands of your specific project with the example shown above. And of course, you can import any other YAML file. You don't have to rely on the default CropVariants.yaml if the resulting YAML file includes a configuration for every necessary part.

Detailed manual and more examples
---------------------------------

[](#detailed-manual-and-more-examples)

- [Handling of cropVariants in TYPO3](Resources/LegacyDocumentation/Markdown/Images/Index.md#handling-of-cropvariants-in-typo3)
- [DefaultsAndPresets](Resources/LegacyDocumentation/Markdown/Images/DefaultsAndPresets.md)
- [CropVariantsBuilder Examples](Resources/LegacyDocumentation/Markdown/Images/CropVariantsBuilder.md)
- [Translation logic for cropVariant label](Resources/LegacyDocumentation/Markdown/Images/TranslationLogic.md)

---

*Cheers to all TYPO3 enthusiasts out there!*

---

Created by
----------

[](#created-by)

Support
-------

[](#support)

Many thanks to my employer [supseven.at](https://www.supseven.at/) for sponsoring work time.

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance62

Regular maintenance activity

Popularity34

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 82.1% 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 ~276 days

Recently: every ~221 days

Total

9

Last Release

149d ago

Major Versions

0.1.0 → 1.0.02020-01-20

1.0.3 → 2.0.02023-09-05

2.0.2 → 3.0.12026-02-03

PHP version history (4 changes)0.1.0PHP &gt;=7.2

1.0.3PHP &gt;=7.4.1

2.0.0PHP &gt;=8.0.0

3.0.1PHP &gt;=8.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b9b873a3ab532be8b148c0da96ce9c37931a2268d52af7a00e0d0251f855088?d=identicon)[josefglatz](/maintainers/josefglatz)

---

Top Contributors

[![josefglatz](https://avatars.githubusercontent.com/u/2861556?v=4)](https://github.com/josefglatz "josefglatz (64 commits)")[![helmutstrasser](https://avatars.githubusercontent.com/u/888354?v=4)](https://github.com/helmutstrasser "helmutstrasser (7 commits)")[![garfieldius](https://avatars.githubusercontent.com/u/705480?v=4)](https://github.com/garfieldius "garfieldius (4 commits)")[![infabo](https://avatars.githubusercontent.com/u/3999104?v=4)](https://github.com/infabo "infabo (2 commits)")[![georgringer](https://avatars.githubusercontent.com/u/1905663?v=4)](https://github.com/georgringer "georgringer (1 commits)")

---

Tags

productivitytypo3-cms-extensiontypo3-extensionextensiontypo3imagemanipulationcropvariantcropvariants

### Embed Badge

![Health badge](/badges/josefglatz-cropvariantsbuilder/health.svg)

```
[![Health](https://phpackages.com/badges/josefglatz-cropvariantsbuilder/health.svg)](https://phpackages.com/packages/josefglatz-cropvariantsbuilder)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40529.5k](/packages/wazum-sluggi)[friendsoftypo3/tt-address

Displays a list of addresses from an address table on the page.

461.8M44](/packages/friendsoftypo3-tt-address)[friendsoftypo3/visual-editor

TYPO3 CMS Visual Editor - Brings a modern WYSIWYG editing experience to TYPO3 CMS.

576.1k2](/packages/friendsoftypo3-visual-editor)[quellenform/t3x-iconpack

Provides an iconpack-registry for custom iconpacks.

1552.6k27](/packages/quellenform-t3x-iconpack)[t3brightside/pagelist

TYPO3 CMS extension to create news, events, vacancies and products or just page lists. Demo: microtemplate.t3brightside.com

1121.5k1](/packages/t3brightside-pagelist)

PHPackages © 2026

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