[BUGFIX] Fixed Image-URL in SourceViewHelper after TYPO3 12 Update #1871
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In TYPO3 12, there is a change in the behavior of the ContentObjectRenderer. The array key 3 of the info-array returned by getImgResource() does not longer contain the relative image path for processed images. Instead, the absolute path is now returned. See https://forge.typo3.org/issues/95379
As a result, the absolute image path is used in the SourceViewHelper and the images on the page are broken. To fix this, i added a check if the image is processed. If so, the relative URL is fetched from the ProcessedFile-object. The rest of the behavior remains the same.