feat: implement automatic image optimization with Astro Assets
- Configure content collections to use image() helper for type-safe image references - Replace all <img> tags with <Image> component from astro:assets - Migrate images from /public to /src/assets for automatic optimization - Update blog posts to use relative paths in frontmatter (../../assets/photos/) - Remove unused images and duplicates from /public folder - Update Footer component to use optimized SVG icons - Clean up manifest.json to use favicon.ico instead of deleted photos Performance improvements: - remote.jpg: 1.8MB → 128KB (93% reduction) - me.png: 71KB → 12KB (83% reduction) - Automatic WebP conversion - Tree-shaking: only used images are optimized /public folder reduced from 2.3MB to 32KB (only essential files) Build output: 2.2MB with fully optimized images ready for S3 deployment
This commit is contained in:
parent
e3f7a631eb
commit
049c20a4b2
47 changed files with 632 additions and 419 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "Lorenzo Iovino - Software Developer",
|
||||
"name": "Lorenzo Iovino - Software Engineer",
|
||||
"short_name": "Lorenzo Iovino",
|
||||
"description": "Software Developer based in Sicily. Passionate about technology, remote work, and life balance.",
|
||||
"description": "Software Engineer based in Sicily. Passionate about technology, remote work, and life balance.",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"background_color": "#1e3a8a",
|
||||
|
|
@ -12,18 +12,6 @@
|
|||
"src": "/favicon.ico",
|
||||
"sizes": "48x48",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "/photos/me.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/photos/me.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
}
|
||||
],
|
||||
"categories": ["business", "productivity", "lifestyle"],
|
||||
|
|
@ -38,8 +26,8 @@
|
|||
"url": "/blog",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/photos/me.png",
|
||||
"sizes": "192x192"
|
||||
"src": "/favicon.ico",
|
||||
"sizes": "48x48"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -50,8 +38,8 @@
|
|||
"url": "/bio",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/photos/me.png",
|
||||
"sizes": "192x192"
|
||||
"src": "/favicon.ico",
|
||||
"sizes": "48x48"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue