ImageResource

class \TYPO3\CMS\Core\Imaging\ImageResource

DTO for a resolved image resource. Mainly used by ContentObjectRenderer.

Tags

see
ContentObjectRenderer::getImgResource()

Table of Contents

Properties

$extension  : string
$fullPath  : string
$height  : int
$originalFile  : File|null
$processedFile  : ProcessedFile|null
$publicUrl  : string|null
$width  : int

Methods

__construct()  : mixed
createFromImageInfo()  : self
createFromProcessedFile()  : self
getExtension()  : string
getFullPath()  : string
getHeight()  : int
getLegacyImageResourceInformation()  : array{0: int<0, max>, 1: int<0, max>, 2: string, 3: string, 'origFile': string|null, 'origFile_mtime': int}
Legacy image resource information, used for asset collector and GifBuilder BBOX
getOriginalFile()  : File|null
getProcessedFile()  : ProcessedFile|null
getPublicUrl()  : string|null
getWidth()  : int
withExtension()  : self
withFullPath()  : self
withHeight()  : self
withOriginalFile()  : self
withProcessedFile()  : self
withPublicUrl()  : self
withWidth()  : self

Properties

$publicUrl

protected string|null $publicUrl = null

Methods

__construct()

public __construct(int $width, int $height, string $extension, string $fullPath[, string|null $publicUrl = null ][, File|null $originalFile = null ][, ProcessedFile|null $processedFile = null ]) : mixed

Parameters

$width : int
$height : int
$extension : string
$fullPath : string
$publicUrl : string|null = null
$originalFile : File|null = null
$processedFile : ProcessedFile|null = null

createFromImageInfo()

public static createFromImageInfo(ImageInfo $imageInfo) : self

Parameters

$imageInfo : ImageInfo

Return values

self

getExtension()

public getExtension() : string

Return values

string

getFullPath()

public getFullPath() : string

Return values

string

getHeight()

public getHeight() : int

Return values

int

getLegacyImageResourceInformation()

Legacy image resource information, used for asset collector and GifBuilder BBOX

public getLegacyImageResourceInformation() : array{0: int<0, max>, 1: int<0, max>, 2: string, 3: string, 'origFile': string|null, 'origFile_mtime': int}

Return values

array{0: int<0, max>, 1: int<0, max>, 2: string, 3: string, 'origFile': string|null, 'origFile_mtime': int}

getPublicUrl()

public getPublicUrl() : string|null

Return values

string|null

getWidth()

public getWidth() : int

Return values

int

withExtension()

public withExtension(string $extension) : self

Parameters

$extension : string

Return values

self

withFullPath()

public withFullPath(string $fullPath) : self

Parameters

$fullPath : string

Return values

self

withHeight()

public withHeight(int $height) : self

Parameters

$height : int

Return values

self

withOriginalFile()

public withOriginalFile(File|null $originalFile) : self

Parameters

$originalFile : File|null

Return values

self

withPublicUrl()

public withPublicUrl(string $publicUrl) : self

Parameters

$publicUrl : string

Return values

self

withWidth()

public withWidth(int $width) : self

Parameters

$width : int

Return values

self
On this page