- Convert 34 images (PNG/JPG) to WebP at quality 80 - Total savings: 21.6 MB → 2.8 MB (87% reduction) - Add <picture> elements with WebP source + original fallback - Add loading=lazy to all below-the-fold images - Update lightbox to serve WebP images with error fallback
25 lines
595 B
Nginx Configuration File
25 lines
595 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
root /usr/share/nginx/html;
|
|
index haus-schleusingen.html;
|
|
|
|
# Gzip aktivieren
|
|
gzip on;
|
|
gzip_types text/css application/javascript image/svg+xml application/json text/xml;
|
|
gzip_min_length 256;
|
|
gzip_vary on;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /haus-schleusingen.html;
|
|
}
|
|
|
|
# Lange Cache-Dauer für Bilder und statische Assets
|
|
location ~* \.(jpg|jpeg|png|webp|gif|ico|svg|css|js|woff2?)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, immutable";
|
|
access_log off;
|
|
}
|
|
}
|