---
title: "Deprecation: #93981 - GraphicalFunctions->gif_or_jpg"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-93981-1751961645"
source: "Changelog/14.0/Deprecation-93981-GraphicalFunctionsGifOrJpg.rst"
typo3-version: "14.0"
typo3-major: 14
type: "deprecation"
issue: 93981
forge: "https://forge.typo3.org/issues/93981"
tags: ["TCA", "FullyScanned", "ext:core"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Deprecation: #93981 - GraphicalFunctions->gif_or_jpg {#deprecation-93981-1751961645}

See [forge#93981](https://forge.typo3.org/issues/93981)

## Description {#description}

Default image formats can now be configured thanks to
[forge#93981](https://forge.typo3.org/issues/93981) (see [Feature: #93981 - Specify default image conversion processing](https://docs.typo3.org/permalink/changelog:feature-93981-1734803053)).

As a result, the method `gif_or_jpg()` of
`\TYPO3\CMS\Core\Imaging\GraphicalFunctions` is no longer needed.

Fallback behavior for image preview generation now follows the configured
file extensions rather than a hardcoded GIF/JPEG switch.

A new method,
`GraphicalFunctions->determineDefaultProcessingFileExtension()`,
has been introduced.

It accepts a file extension such as `'pdf'` as an argument and returns
the corresponding default output extension for preview generation.
This method is currently marked as `@internal`, as it may later be moved
to a dedicated service class.

In general, third-party extensions should not determine the output format
manually but rely on TYPO3’s built-in image generation APIs.

Deprecated method:

-   `\TYPO3\CMS\Core\Imaging\GraphicalFunctions->gif_or_jpg()`

## Impact {#impact}

Calling this method will trigger a deprecation-level log entry and will stop
working in TYPO3 v15.0.

## Affected installations {#affected-installations}

Instances that directly use the deprecated method.

## Migration {#migration}

```php
use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
use TYPO3\CMS\Core\Utility\GeneralUtility;

$graphicalFunctions = GeneralUtility::makeInstance(GraphicalFunctions::class);

// Before
$filetype = $graphicalFunctions->gif_or_jpg('pdf', 800, 600);
// Returned: 'jpg'

// After
$filetype = $graphicalFunctions->determineDefaultProcessingFileExtension('pdf');
// Returns: 'jpg' (for example, now depends on configuration!)
```

This is a temporary migration using an `@internal` method, which is subject
to change. Code like the above should generally be avoided in third-party
extensions.

Instead, use `GraphicalFunctions->resize()` and specify the argument
`$targetFileExtension = 'web'` so that actual operations use the configured
target formats.
