Skip to content

Commit

Permalink
Merge pull request #1 from visol-forks/task/ignore-asset-variants
Browse files Browse the repository at this point in the history
TASK: Don't try replacing asset resources of ImageVariants
  • Loading branch information
sorenmalling authored May 4, 2022
2 parents 1fc1dae + d3eb0fc commit bbba791
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Classes/ImageResizerUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Neos\Flow\Annotations as Flow;
use Neos\Media\Domain\Model\AssetInterface;
use Neos\Media\Domain\Model\ImageVariant;
use Neos\Media\Domain\Model\ThumbnailConfiguration;
use Neos\Media\Domain\Service\AssetService;
use Neos\Media\Domain\Service\ThumbnailService;
Expand Down Expand Up @@ -35,6 +36,10 @@ class ImageResizerUtility

public function resize(AssetInterface $asset)
{
if ($asset instanceof ImageVariant) {
return;
}

$configuration = $this->configuration;
$sourceMediaType = MediaTypes::parseMediaType($asset->getMediaType());

Expand Down

0 comments on commit bbba791

Please sign in to comment.