{{-- Position and Primary Badge --}}
{{ $image->display_order + 1 }}
@if($image->is_primary)
Primary
@else
{{-- Set as Primary Button (only for non-primary images) --}}
@endif
{{-- Reorder and Enable/Disable Buttons --}}
{{-- Enable/Disable Toggle --}}
{{-- Image Preview --}}
{{-- Image Details --}}
@if($image->competitorAnalysis)
Source:
{{ $image->competitorAnalysis->website_name }}
@endif
Dimensions:
@php
$allSizes = $this->product->productImages
->where('original_filename', $image->original_filename)
->sortByDesc(fn($img) => $img->width * $img->height)
->map(fn($img) => $img->width . '×' . $img->height)
->unique()
->values();
@endphp
{{ $allSizes->join(', ') }}
Size:
@php
$allFileSizes = $this->product->productImages
->where('original_filename', $image->original_filename)
->sortByDesc(fn($img) => $img->width * $img->height)
->map(fn($img) => number_format($img->file_size / 1024, 1) . ' KB')
->values();
@endphp
{{ $allFileSizes->join(', ') }}
Format:
{{ pathinfo($image->storage_path, PATHINFO_EXTENSION) }}
{{-- Delete Button --}}