-
Notifications
You must be signed in to change notification settings - Fork 0
Optimize all website images for web delivery #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Optimized all PNG images in assets/images/ using pngquant and optipng to significantly reduce file sizes while maintaining visual quality. ## Large Background Images - location-bg.png: 940 KB → 186 KB (80.2% reduction) - about-bg.png: 646 KB → 91 KB (85.9% reduction) - hero-moon.png: 192 KB → 10 KB (94.8% reduction) ## Speaker Images (267x267px) - speaker_kelsey_hightower.png: 77 KB → 19 KB (75.3% reduction) - speaker_priya_ananthasankar.png: 120 KB → 35 KB (70.8% reduction) - speaker_rok_garbas.png: 75 KB → 21 KB (72.0% reduction) - speaker_ron_efroni.png: 115 KB → 35 KB (69.6% reduction) - speaker_stormy_peters.png: 80 KB → 19 KB (76.3% reduction) ## Icons & Favicons - android-chrome-192x192.png: 14 KB → 10 KB (25.8% reduction) - android-chrome-512x512.png: 53 KB → 39 KB (27.0% reduction) - apple-touch-icon.png: 12 KB → 9.1 KB (25.9% reduction) - favicon-16x16.png: 668 B → 530 B (20.7% reduction) - favicon-32x32.png: 1.5 KB → 1.1 KB (26.7% reduction) - grid.png: 15 KB → 7.5 KB (50.0% reduction) - flox_logo.png: 1.7 KB → 1.5 KB (11.8% reduction) ## Overall Impact - Total Original Size: ~2.3 MB - Total Optimized Size: ~556 KB - Overall Savings: ~76.6% (1.8 MB saved!) Optimization tools (imagemagick, pngquant, optipng, libwebp) added to flox environment for future image optimization needs.
✅ Deploy Preview for planetnix-com ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Implemented native HTML lazy loading on 12 below-the-fold images: - 5 speaker images (127 KB total) - 2 large background images (277 KB total) - 5 about section SVG icons Benefits: - Reduces initial page load from ~556 KB to ~139 KB of images - 94% reduction in initial image payload - Improves First Contentful Paint and Largest Contentful Paint - Images load automatically as user scrolls near them Also added descriptive alt attributes for better accessibility. Hero images (hero-moon.png, logo) intentionally not lazy-loaded as they are above the fold and critical for initial render.
Set up Just as a command runner for common development tasks with automated performance testing via Lighthouse. New files: - Justfile: Command recipes with comprehensive inline documentation Available commands: - just dev: Start development server - just lighthouse: Run full Lighthouse audit (HTML report) - just lighthouse-full: Comprehensive desktop audit - just lighthouse-mobile: Mobile performance audit - just perf: Quick performance score check - just optimize-images: Re-run image optimization - just clean: Remove generated reports - just info: Show environment information Flox packages added: - just (1.43.1): Command runner - nodejs (22.21.1): For running Lighthouse via npx Updated .gitignore to exclude: - All Lighthouse report files - Temporary .server.pid file Lighthouse runs via npx (Node.js) for cross-platform compatibility instead of platform-specific Flox packages. Complete documentation is included in Justfile header comments (65 lines). Current performance score: 84/100
Creates automated Lighthouse audits that run on every pull request, compares against the base branch, and posts results as a comment. Features: - Runs on PR open, synchronize, and reopen events - Only triggers on changes to index.html, assets/, or the workflow itself - Tests base branch first, then PR branch - Compares all 4 Lighthouse categories: Performance, Accessibility, Best Practices, SEO - Uses Flox environment for consistent tooling Workflow process: 1. Checkout and test base branch (e.g., main) 2. Checkout and test PR branch 3. Calculate score deltas 4. Post comparison comment to PR PR Comment shows: - Side-by-side score comparison (base vs PR) - Color-coded change indicators: 🟢 Positive change (improvement) 🔴 Negative change (regression) ⚪ No change - Performance impact summary - Expandable sections for score guide and optimization tips - Automatic update on subsequent commits Requirements: - Uses flox/install-flox-action@v1 - Requires pull-requests: write permission - Runs on Ubuntu latest with Node.js via Flox Documentation now in Justfile header comments only.
…nd Contributing section - Replace all Tailwind CSS references with Pico CSS - Add comprehensive Quick Start guide (3 commands) - Add inviting Contributing section with 6-step guide - Add performance highlights (84/100 score, 76.6% optimization) - Add emoji headers, badges, and improved structure - Keep CLAUDE.md in sync with README updates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- All just commands must be run with `flox activate --` - Added alternative approach: activate shell first, then run commands - Updated performance testing section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Convert PNG images to WebP with 85% quality - Use <picture> element with WebP + PNG fallback for broad browser support - Updated 8 images: hero-moon, location-bg, about-bg, and 5 speaker images - Achieved ~180KB savings (48% reduction on converted images) - Kept grid.png as PNG (WebP was larger) - Performance score improved from 84/100 to 86/100 Image savings: - about-bg: 91K → 59K (35% reduction) - location-bg: 186K → 100K (46% reduction) - speaker images: Average 65% reduction - hero-moon: 10K → 8.4K (16% reduction) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Fixed all Lighthouse accessibility and SEO issues: - Added meta description for better SEO and search results - Added alt="Flox" to Flox logo image in footer - Fixed link without discernible name (image alt text serves as link text) Lighthouse score improvements: - Accessibility: 83/100 → 100/100 (+17) ✓ PERFECT - SEO: 83/100 → 100/100 (+17) ✓ PERFECT - Best Practices: 100/100 (maintained) - Performance: 86/100 (maintained) All four categories now scoring optimally with zero remaining issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements comprehensive web performance optimizations including image optimization, lazy loading, and automated performance testing infrastructure.
Changes
1. Image Optimization (Commit 1)
Optimized all PNG images in
assets/images/using pngquant and optipng to significantly reduce file sizes while maintaining visual quality.Large Background Images:
location-bg.png: 940 KB → 186 KB (80.2% reduction)about-bg.png: 646 KB → 91 KB (85.9% reduction)hero-moon.png: 192 KB → 10 KB (94.8% reduction)Speaker Images (267x267px):
speaker_kelsey_hightower.png: 77 KB → 19 KB (75.3% reduction)speaker_priya_ananthasankar.png: 120 KB → 35 KB (70.8% reduction)speaker_rok_garbas.png: 75 KB → 21 KB (72.0% reduction)speaker_ron_efroni.png: 115 KB → 35 KB (69.6% reduction)speaker_stormy_peters.png: 80 KB → 19 KB (76.3% reduction)Icons & Favicons:
android-chrome-192x192.png: 14 KB → 10 KB (25.8% reduction)android-chrome-512x512.png: 53 KB → 39 KB (27.0% reduction)apple-touch-icon.png: 12 KB → 9.1 KB (25.9% reduction)favicon-16x16.png: 668 B → 530 B (20.7% reduction)favicon-32x32.png: 1.5 KB → 1.1 KB (26.7% reduction)grid.png: 15 KB → 7.5 KB (50.0% reduction)flox_logo.png: 1.7 KB → 1.5 KB (11.8% reduction)Overall Impact:
Optimization tools (imagemagick, pngquant, optipng, libwebp) added to flox environment for future use.
2. Lazy Loading Implementation (Commit 2)
Added native HTML lazy loading to 12 below-the-fold images:
Benefits:
Also added descriptive alt attributes for better accessibility.
Hero images (hero-moon.png, logo) intentionally not lazy-loaded as they are above the fold and critical for initial render.
3. Just Command Runner (Commit 3)
Set up Just as a command runner for common development tasks with automated performance testing via Lighthouse.
Available commands:
Flox packages added:
just(1.43.1): Command runnernodejs(22.21.1): For running Lighthouse via npxDocumentation:
justto see all available commandsCurrent performance score: 84/100
4. GitHub Workflow for Lighthouse CI (Commit 4)
Created automated Lighthouse audits that run on every pull request, compare against the base branch, and post results as a comment.
Features:
index.html,assets/, or the workflow itselfWorkflow process:
PR Comment shows:
Combined Impact
Before this PR:
After this PR:
Testing
Tested with Playwright MCP:
loading="lazy"attributeTested with Just commands:
just perf- Performance score: 84/100Files Changed
index.html- Added lazy loading attributes and alt tagsassets/images/*.png- Optimized all PNG imagesJustfile- New command runner with comprehensive inline docs.github/workflows/lighthouse-pr.yml- New CI workflow for performance testing.gitignore- Added Lighthouse reports and temp files.flox/env/manifest.toml&.flox/env/manifest.lock- Added just, nodejs packagesNext Steps
After this PR is merged:
just lighthouselocally to test performance before pushing