Improve load time of marhun page
This commit is contained in:
@@ -129,23 +129,23 @@ class MarhunPhotoService
|
||||
$cwebp_compilers = [
|
||||
'Windows' => 'binaries\libwebp-1.2.4-windows-x64\bin\cwebp',
|
||||
'Linux' => 'binaries\libwebp-1.2.4-linux-x86-64\bin\cwebp',
|
||||
];
|
||||
|
||||
$cwebp_compilers_darwin = [
|
||||
'X86-64' => 'binaries\libwebp-1.2.4-mac-X86-64\bin\cwebp',
|
||||
'arm64' => 'binaries\libwebp-1.2.4-mac-arm64\bin\cwebp',
|
||||
'Darwin' => [
|
||||
'X86-64' => 'binaries\libwebp-1.2.4-mac-X86-64\bin\cwebp',
|
||||
'arm64' => 'binaries\libwebp-1.2.4-mac-arm64\bin\cwebp',
|
||||
],
|
||||
];
|
||||
|
||||
$server_operating_system = explode(' ', trim(php_uname()))[0];
|
||||
$server_processor_architecture = trim(php_uname('m'));
|
||||
|
||||
if ($server_operating_system === 'Darwin') {
|
||||
return resource_path($cwebp_compilers['Darwin'][$server_processor_architecture]);
|
||||
}
|
||||
|
||||
if (in_array($server_operating_system, array_keys($cwebp_compilers))) {
|
||||
return resource_path($cwebp_compilers[$server_operating_system]);
|
||||
}
|
||||
|
||||
if ($server_operating_system === 'Darwin') {
|
||||
return resource_path($cwebp_compilers_darwin[$server_processor_architecture]);
|
||||
}
|
||||
}
|
||||
|
||||
private function optimizeImageToWebP($originalFilePath, $directory, $lelongbidmarhun_id)
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
<link rel="stylesheet" href="{{ asset('css/marhun-registrations-webcam.css') }}">
|
||||
@endpush
|
||||
|
||||
@include('marhun.partials.camera_modals_per_marhun')
|
||||
@include('marhun.partials.camera_modals')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
|
||||
@include('marhun.partials.camera_modals_per_marhun')
|
||||
@include('marhun.partials.camera_modals')
|
||||
|
||||
<div class="row ">
|
||||
<div class="col mx-auto p-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="border border-secondary">
|
||||
<div class="d-none camera-shutter justify-content-center align-items-center" style="width:960px; height:540px"><img src="{{ asset('img/camera-shutter.svg') }}"></div>
|
||||
<img class="image-tag-overallmarhun" onclick="viewCapturedPhoto()"
|
||||
src="{{ asset('img/pngtree-diamond-wedding-ring.png') }}" width="960"
|
||||
src="" width="960"
|
||||
class="border border-dark d-none">
|
||||
<video class="video-tag-overallmarhun" width="960" autoplay=true />
|
||||
</div>
|
||||
@@ -77,7 +77,7 @@
|
||||
<div class="border border-secondary">
|
||||
<div class="d-none camera-shutter justify-content-center align-items-center" style="width:960px; height:540px"><img src="{{ asset('img/camera-shutter.svg') }}"></div>
|
||||
<img class="image-tag-overallmarhun" onclick="viewCapturedPhoto()"
|
||||
src="{{ asset('img/pngtree-diamond-wedding-ring.png') }}" width="960"
|
||||
src="" width="960"
|
||||
class="border border-dark d-none">
|
||||
<video class="video-tag-overallmarhun" width="960" autoplay=true />
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="border border-secondary">
|
||||
<div class="d-none camera-shutter justify-content-center align-items-center" style="width:960px; height:540px"><img src="{{ asset('img/camera-shutter.svg') }}"></div>
|
||||
<img class="image-tag-overallmarhun" onclick="viewCapturedPhoto()"
|
||||
src="{{ asset('img/pngtree-diamond-wedding-ring.png') }}" width="960"
|
||||
src="" width="960"
|
||||
class="border border-dark d-none">
|
||||
<video class="video-tag-overallmarhun" width="960" autoplay=true />
|
||||
</div>
|
||||
@@ -77,7 +77,7 @@
|
||||
<div class="border border-secondary">
|
||||
<div class="d-none camera-shutter justify-content-center align-items-center" style="width:960px; height:540px"><img src="{{ asset('img/camera-shutter.svg') }}"></div>
|
||||
<img class="image-tag-overallmarhun" onclick="viewCapturedPhoto()"
|
||||
src="{{ asset('img/pngtree-diamond-wedding-ring.png') }}" width="960"
|
||||
src="" width="960"
|
||||
class="border border-dark d-none">
|
||||
<video class="video-tag-overallmarhun" width="960" autoplay=true />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user