Task #56276

Centralize check if file is an image

Added by Alexander Stehlik over 6 years ago. Updated 3 months ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Backend API
Start date:
2014-02-25
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Sprint Focus:

Description

Currently the check if a file is an image is done on various places in the core, always using the same code:

$isImage = GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileExtension);

It would make sense to centralize this check and maybe optimize the performance.


Related issues

Duplicates TYPO3 Core - Task #90305: Centralize imagefile_ext, mediafile_ext and textfile_ext Closed 2020-02-03

History

#1 Updated by Mathias Schreiber over 5 years ago

  • Description updated (diff)
  • Status changed from New to Needs Feedback
  • Assignee set to Mathias Schreiber

Hey Alex,

do you by chance have a list at hand?

#2 Updated by Alexander Opitz almost 5 years ago

  • Status changed from Needs Feedback to New
  • Assignee deleted (Mathias Schreiber)
  • Target version set to 7.5

No list needed IMHO but a target.

#3 Updated by Benni Mack over 4 years ago

  • Target version changed from 7.5 to 7 LTS

#4 Updated by Riccardo De Contardi over 4 years ago

  • Target version changed from 7 LTS to Candidate for Major Version

#5 Updated by Riccardo De Contardi about 2 years ago

on latest master 9.3-dev I've searched for the string "GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']" and this is the result list:

typo3/sysext/install/Classes/Controller/EnvironmentController.php
typo3/sysext/core/Classes/Resource/Processing/LocalPreviewHelper.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/setup/Classes/Controller/SetupModuleController.php
typo3/sysext/backend/Classes/Form/Element/FileInfoElement.php
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php
typo3/sysext/backend/Classes/Controller/File/FileController.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/filelist/Classes/FileFacade.php
typo3/sysext/filelist/Classes/FileList.php

#6 Updated by Susanne Moog 3 months ago

  • Duplicates Task #90305: Centralize imagefile_ext, mediafile_ext and textfile_ext added

#7 Updated by Susanne Moog 3 months ago

  • Status changed from New to Closed

Fixed with #90305

Also available in: Atom PDF