MagicImageService

class \TYPO3\CMS\Core\Resource\Service\MagicImageService

Magic image service

Deprecated

since v12. Will be removed with v13.

Table of Contents

Properties

$magicImageMaximumHeight  : int
Maximum height of magic images
$magicImageMaximumWidth  : int
Maximum width of magic images These defaults allow images to be based on their width - to a certain degree - by setting a high height.

Methods

__construct()  : mixed
createMagicImage()  : ProcessedFile
Creates a magic image
setMagicImageMaximumDimensions()  : mixed
Set maximum dimensions of magic images based on RTE configuration

Properties

$magicImageMaximumHeight

Maximum height of magic images

protected int $magicImageMaximumHeight = 1000

$magicImageMaximumWidth

Maximum width of magic images These defaults allow images to be based on their width - to a certain degree - by setting a high height.

protected int $magicImageMaximumWidth = 300

Then we're almost certain the image will be based on the width

Methods

createMagicImage()

Creates a magic image

public createMagicImage(File $imageFileObject, array $fileConfiguration) : ProcessedFile

Parameters

$imageFileObject : File

the original image file

$fileConfiguration : array

(width, height)

Return values

ProcessedFile

setMagicImageMaximumDimensions()

Set maximum dimensions of magic images based on RTE configuration

public setMagicImageMaximumDimensions(array $rteConfiguration) : mixed

Parameters

$rteConfiguration : array

RTE configuration probably coming from page TSconfig

On this page