- // Check if opacity is set(rgba or rgb)
- if($opacity) {
- if(abs($opacity) > 1)
- $opacity = 1.0;
- $output = 'rgba('.implode(",",$rgb).','.$opacity.')';
+ $imagesToDelete = $imageService->deleteUnusedImages($checkRevisions, $dryRun);
+ $deleteCount = count($imagesToDelete);
+ if ($deleteCount === 0) {
+ session()->flash('warning', trans('settings.maint_image_cleanup_nothing_found'));
+ return redirect('/settings/maintenance')->withInput();
+ }
+
+ if ($dryRun) {
+ session()->flash('cleanup-images-warning', trans('settings.maint_image_cleanup_warning', ['count' => $deleteCount]));