Deprecation: #90522 - TSFE properties regarding images

See forge#90522

Description

The image related properties $imagesOnPage and $lastImageInfo of TypoScriptFrontendController have been marked as deprecated.

Impact

Calling these properties will trigger a PHP E_USER_DEPRECATED error.

Affected Installations

All installations using these properties are affected.

Migration

For $imagesOnPage the AssetCollector may be used instead:

$assetCollector = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(TYPO3\CMS\Core\Page\AssetCollector::class);
$imagesOnPage = $assetCollector->getMedia();