@include('backend.layouts.common.message')
@php
// Get S3 base URL safely (only once)
$spaceCredential = \App\Models\SpaceCredential::where('status', 1)->first();
$imgurl = !empty($spaceCredential) && !empty($spaceCredential->url)
? rtrim($spaceCredential->url, '/') . '/'
: ''; // Ensure valid fallback
@endphp
{{ localize('insert_image') }}
{{ localize_uc('images_list') }}
@foreach ($imageLibraries as $imageLibrary)
@php
$thumb_image_path = !$imageLibrary->disk || $imageLibrary->disk == 'local'
? storage_asset_image($imageLibrary->thumb_image)
: $imgurl . ltrim($imageLibrary->thumb_image, '/');
$large_image_path = !$imageLibrary->disk || $imageLibrary->disk == 'local'
? storage_asset_image($imageLibrary->large_image)
: $imgurl . ltrim($imageLibrary->large_image, '/');
// Extract filenames separately for both thumbnail and large image
$thumb_image_name = pathinfo(parse_url($thumb_image_path, PHP_URL_PATH), PATHINFO_BASENAME);
$large_image_name = pathinfo(parse_url($large_image_path, PHP_URL_PATH), PATHINFO_BASENAME);
@endphp
@endforeach
{{ Str::limit($imageLibrary->title, 10, '...') }}
Thumbnail
{{ Str::limit($imageLibrary->featured_caption,10, '...') }}
Large Image