@extends('layouts.app') @php $canonical = url()->current(); // Or a custom URL if needed @endphp @section('title', 'Compress Image – Reduce File Size Without Losing Quality | Pixxx') @section('meta_description', 'Compress your images quickly and efficiently without losing quality. Optimize file size for faster loading.') @section('meta_keywords', 'compress image, reduce image size, image compression, optimize images') @section('content')

Compress Image

Reduce image file size quickly and easily without sacrificing quality.
Compress multiple images at once for faster results.

@if (!empty($success)) @endif @if (!empty($zipUrl) && !$single) @php $zipPath = public_path('output_generated/' . basename($zipUrl)); $zipSizeBytes = file_exists($zipPath) ? filesize($zipPath) : 0; $formatSize = fn($size) => $size >= 1048576 ? round($size / 1048576, 2) . ' MB' : round($size / 1024, 2) . ' KB'; $totalOriginalBytes = 0; $totalCompressedBytes = 0; if (!empty($images)) { foreach ($images as $img) { $totalOriginalBytes += $img['original_size_bytes'] ?? 0; $totalCompressedBytes += $img['compressed_size_bytes'] ?? 0; } } @endphp @endif @if (!empty($images))
@foreach ($images as $image) @php $ext = pathinfo(parse_url($image['url'], PHP_URL_PATH), PATHINFO_EXTENSION); @endphp
Compressed Image

Format: {{ strtoupper($ext) }}

Original Size: {{ $image['original_size'] }}

Compressed Size: {{ $image['compressed_size'] }}

Compressed Size: {{ $image['reduction_percent'] }}

Download
@endforeach
@endif
@endsection