/dashboard
Unoptimized images contain redundant data. Compress them to improve LCP.
Unoptimized JPEG/PNG images contain metadata and redundant pixel data. Lossless or lossy compression can cut size 30-60% with no perceptible quality difference — directly improving LCP.
// Intervention Image v3 — optimize on upload
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Gd\Driver;
$manager = new ImageManager(new Driver());
$manager->read($path)
->toWebp(quality: 80)
->save(storage_path('app/public/images/hero.webp'));
// Storing raw upload with no compression
$request->file('image')->store('images'); // may be a 4 MB JPEG
main > section.hero > img
<img src="/images/hero.jpg" loading="eager">
|
Type
|
Count
|
Size
|
|---|---|---|
| script | 13 | 617 KB |
| stylesheet | 3 | 133 KB |
| image | 19 | 391 KB |
| font | 2 | 48 KB |
| document | 1 | 22 KB |
|
Entity
|
Transfer
|
Blocking
|
Main thread
|
|---|---|---|---|
| Google Analytics | 23 KB | 60ms | 100ms |
|
URL
|
Type
|
Size
|
Duration
|
|---|---|---|---|
vendor.js
|
371 KB | ||
products
|
24 KB |
app.js
581ms
vendor.js
246ms