Skip to content

Commit

Permalink
fixes too loose condition that cause to wipe out all generated respon…
Browse files Browse the repository at this point in the history
…sive images if they are in the same output directory (#3558)
  • Loading branch information
inalto authored Mar 4, 2024
1 parent fad8e66 commit b27eb3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MediaCollections/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function removeResponsiveImages(Media $media, string $conversionName = 'm

$responsiveImagePaths = array_filter(
$allFilePaths,
fn (string $path) => Str::contains($path, $conversionName)
fn (string $path) => Str::contains($path, $media->name) && Str::contains($path, $conversionName)
);

$this->filesystem->disk($media->disk)->delete($responsiveImagePaths);
Expand Down

0 comments on commit b27eb3f

Please sign in to comment.