MagicImageService
Magic image service
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
- 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<string|int, mixed> $fileConfiguration) : ProcessedFile
Parameters
- $imageFileObject : File
-
the original image file
- $fileConfiguration : array<string|int, mixed>
-
(width, height)
Return values
ProcessedFilesetMagicImageMaximumDimensions()
Set maximum dimensions of magic images based on RTE configuration
public
setMagicImageMaximumDimensions(array<string|int, mixed> $rteConfiguration) : mixed
Parameters
- $rteConfiguration : array<string|int, mixed>
-
RTE configuration probably coming from PageTSConfig