Skip to content

Commit

Permalink
[TASK] Respect TYPO3 setting "versionNumberInFilename" (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
infabo authored Nov 24, 2023
1 parent a448f8a commit f6634f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Classes/ViewHelpers/SvgViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Ssch\Typo3Encore\Integration\FilesystemInterface;
use Ssch\Typo3Encore\Integration\IdGeneratorInterface;
use TYPO3\CMS\Core\Resource\Exception\FolderDoesNotExistException;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Service\ImageService;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
use UnexpectedValueException;
Expand Down Expand Up @@ -80,6 +81,7 @@ public function render(): string
try {
$image = $this->imageService->getImage($this->arguments['src'], null, false);
$imageUri = $this->imageService->getImageUri($image, (bool) $this->arguments['absolute']);
$imageUri = GeneralUtility::createVersionNumberedFilename($imageUri);
$imageContents = $image->getContents();
} catch (FolderDoesNotExistException $folderDoesNotExistException) {
$imageUri = $this->arguments['src'];
Expand Down

0 comments on commit f6634f2

Please sign in to comment.