Skip to content

Homepage optimization#153

Merged
kzndotsh merged 2 commits intoallthingslinux:mainfrom
rainyluna:main
Jan 16, 2026
Merged

Homepage optimization#153
kzndotsh merged 2 commits intoallthingslinux:mainfrom
rainyluna:main

Conversation

@rainyluna
Copy link
Contributor

@rainyluna rainyluna commented Jan 16, 2026

Summary by Sourcery

Optimize homepage image assets and supporter logos for better performance and dark-theme visibility.

Enhancements:

  • Switch homepage hero distro icons, supporter logos, site icon, donate background, and testimonial avatars to WebP assets for more efficient loading.
  • Simplify supporter logo rendering by applying a consistent invert filter for dark backgrounds while preserving TechSoup’s original colors.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 16, 2026

Reviewer's Guide

This PR optimizes the homepage assets by switching multiple hero, supporter, metadata, donate CTA, and testimonial avatar images from PNG/SVG to WebP and simplifies supporter logo handling now that SVGs are no longer used.

Class diagram for updated SupporterLogo component

classDiagram
  class SupporterLogoProps {
    +string name
    +string logo
  }

  class SupporterLogo {
    +string name
    +string logo
    +boolean isMonday
    +boolean isGitHub
    +boolean isTechSoup
    +string logoClassName
    +ReactCSSProperties logoStyle
    +render(): JSXElement
  }

  SupporterLogo --> SupporterLogoProps : receives
Loading

File-Level Changes

Change Details Files
Convert hero distro badge images on the homepage hero section to WebP assets.
  • Update all left-side hero badge Image src paths from PNG to WebP equivalents
  • Update all right-side hero badge Image src paths from PNG to WebP equivalents
components/pages/home/hero.tsx
Standardize supporter logos on the homepage to WebP and simplify image handling logic.
  • Change all supporter logo paths from SVG/PNG to WebP versions in the SUPPORTERS config
  • Remove SVG-specific logic (isSvg) from SupporterLogo component
  • Apply a consistent invert filter to all supporter logos except TechSoup to maintain visibility on dark background
  • Remove unoptimized flag since SVG-specific handling is no longer needed
components/pages/home/supporters.tsx
Optimize global site icon and homepage background image to WebP format.
  • Update default site metadata icon path from PNG to WebP
  • Update Donate CTA backgroundImage CSS inline style from PNG to WebP
app/metadata.ts
components/pages/home/donate-cta.tsx
Convert testimonial avatar images to WebP format for carousel reviews.
  • Change testimonial avatar src template from SVG penguin images to WebP equivalents in the carousel
components/pages/home/testimonials.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • Switching all supporter logos to WebP while keeping the unconditional invert filter for all non-TechSoup brands may significantly alter brand colors; consider scoping the filter only to logos that are meant to be white/monochrome or adjusting per-logo overrides.
  • Now that all supporter logos use WebP (including previously-SVG assets), it might be worth re-evaluating whether filter: brightness(0) saturate(100%) invert(1) still achieves the intended contrast on dark backgrounds for each logo individually.
  • The console.error in the onError handler for supporter logos could be noisy in production if any logo path is wrong or intermittently unavailable; consider gating it behind a debug flag or using a less verbose reporting mechanism.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Switching all supporter logos to WebP while keeping the unconditional invert filter for all non-TechSoup brands may significantly alter brand colors; consider scoping the filter only to logos that are meant to be white/monochrome or adjusting per-logo overrides.
- Now that all supporter logos use WebP (including previously-SVG assets), it might be worth re-evaluating whether `filter: brightness(0) saturate(100%) invert(1)` still achieves the intended contrast on dark backgrounds for each logo individually.
- The `console.error` in the `onError` handler for supporter logos could be noisy in production if any logo path is wrong or intermittently unavailable; consider gating it behind a debug flag or using a less verbose reporting mechanism.

## Individual Comments

### Comment 1
<location> `app/metadata.ts:137` </location>
<code_context>
     //   },
     // ],
-    icon: '/images/logo.png',
+    icon: '/images/logo.webp',
   },
   manifest: '/site.webmanifest',
</code_context>

<issue_to_address>
**suggestion:** Using only a WebP favicon may cause compatibility issues on some platforms that expect PNG/ICO.

Some user agents and integration points (older browsers, OS integrations, crawlers) still require PNG/ICO favicons. Consider specifying multiple formats (e.g., .ico/.png plus .webp) via the `icons` metadata field so icons render correctly across all environments.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

// },
// ],
icon: '/images/logo.png',
icon: '/images/logo.webp',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Using only a WebP favicon may cause compatibility issues on some platforms that expect PNG/ICO.

Some user agents and integration points (older browsers, OS integrations, crawlers) still require PNG/ICO favicons. Consider specifying multiple formats (e.g., .ico/.png plus .webp) via the icons metadata field so icons render correctly across all environments.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (6)
  • public/images/supporters/canva.webp
  • public/images/supporters/cloudflare.webp
  • public/images/supporters/fibery.webp
  • public/images/supporters/okta.webp
  • public/images/supporters/sentry.webp
  • public/images/supporters/techsoup.webp

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Image assets across the application were converted from PNG/SVG to WEBP format. Additionally, Next.js Image components in the hero and supporters sections were optimized with loading attributes and styling props.

Changes

Cohort / File(s) Summary
Image Asset Format Conversion
app/metadata.ts, components/pages/home/donate-cta.tsx, components/pages/home/testimonials.tsx
Migrated image assets from PNG/SVG to WEBP format (logo, background, and avatar images).
Image Asset & Component Optimization
components/pages/home/hero.tsx
Converted icon assets from PNG to WEBP and applied Next.js Image optimization: added shared className with styling utilities and loading attributes (priority or loading="lazy") across 14 icon images.
Image Asset & Rendering Refactor
components/pages/home/supporters.tsx
Converted logo assets to WEBP, removed SVG-specific conditional logic (isSvg check), and eliminated the unoptimized={isSvg} prop; now applies a global brightness filter to all logos except TechSoup.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Homepage optimization' is related to the changeset but is overly broad and vague, covering only the general theme without specifying the primary change (WebP image format conversion). Consider a more specific title like 'Convert homepage images to WebP format' or 'Optimize homepage assets with WebP and improve dark-theme logo visibility' for clarity.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description is directly related to the changeset, clearly outlining the image format conversion to WebP and the supporter logo rendering simplification.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@app/metadata.ts`:
- Around line 137-138: The metadata object's icon currently uses a single WebP
path (icon: '/images/logo.webp'); update the metadata export so the icon field
provides a PNG fallback for browsers that lack WebP favicon support by replacing
the single string with an array of icon entries (first the WebP URL, then the
PNG URL) or by adding an additional icon entry pointing to '/images/logo.png'
alongside the existing WebP entry; locate the icon property in the metadata
object in app/metadata.ts and add the PNG fallback entry.
🧹 Nitpick comments (1)
components/pages/home/supporters.tsx (1)

53-58: Consider per-logo inversion instead of a global filter.
Applying invert(1) to every non-TechSoup logo can skew brand colors (e.g., Canva/Okta). A per-logo flag keeps contrast without altering logos that already work on dark backgrounds.

♻️ Suggested refactor (per-logo flag)
-const SUPPORTERS = [
-  { name: 'Canva', logo: '/images/supporters/canva.webp' },
-  { name: 'Cloudflare', logo: '/images/supporters/cloudflare.webp' },
-  { name: 'TechSoup', logo: '/images/supporters/techsoup.webp' },
+const SUPPORTERS = [
+  { name: 'Canva', logo: '/images/supporters/canva.webp', invertOnDark: true },
+  { name: 'Cloudflare', logo: '/images/supporters/cloudflare.webp', invertOnDark: true },
+  { name: 'TechSoup', logo: '/images/supporters/techsoup.webp', invertOnDark: false },
   // ...
 ] as const;

-const SupporterLogo = memo(({ name, logo }: { name: string; logo: string; }) => {
+const SupporterLogo = memo(({ name, logo, invertOnDark }: { name: string; logo: string; invertOnDark: boolean; }) => {
   // ...
-  const logoStyle: React.CSSProperties = {
-    filter: !isTechSoup ? 'brightness(0) saturate(100%) invert(1)' : 'none',
-  };
+  const logoStyle: React.CSSProperties = {
+    filter: invertOnDark ? 'brightness(0) saturate(100%) invert(1)' : 'none',
+  };
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0230b44 and 149da8f.

📒 Files selected for processing (60)
  • app/metadata.ts
  • components/pages/home/donate-cta.tsx
  • components/pages/home/hero.tsx
  • components/pages/home/supporters.tsx
  • components/pages/home/testimonials.tsx
  • public/android-chrome-192x192-dark.webp
  • public/android-chrome-192x192-light.webp
  • public/android-chrome-512x512-dark.webp
  • public/android-chrome-512x512-light.webp
  • public/apple-touch-icon-dark.webp
  • public/apple-touch-icon-light.webp
  • public/favicon-16x16-dark.webp
  • public/favicon-16x16-light.webp
  • public/favicon-32x32-dark.webp
  • public/favicon-32x32-light.webp
  • public/icon-dark.webp
  • public/icon-light.webp
  • public/images/donatebg.webp
  • public/images/hero/arch.webp
  • public/images/hero/artix.webp
  • public/images/hero/asahi.webp
  • public/images/hero/bazzite.webp
  • public/images/hero/bedrock.webp
  • public/images/hero/cachy.webp
  • public/images/hero/debian.webp
  • public/images/hero/fedora.webp
  • public/images/hero/gentoo.webp
  • public/images/hero/mint.webp
  • public/images/hero/nixos.webp
  • public/images/hero/opensuse.webp
  • public/images/hero/popos.webp
  • public/images/hero/redhat.webp
  • public/images/hero/slackware.webp
  • public/images/hero/ubuntu.webp
  • public/images/hero/void.webp
  • public/images/logo.webp
  • public/images/og.webp
  • public/images/penguins/1.webp
  • public/images/penguins/10.webp
  • public/images/penguins/11.webp
  • public/images/penguins/12.webp
  • public/images/penguins/13.webp
  • public/images/penguins/14.webp
  • public/images/penguins/15.webp
  • public/images/penguins/2.webp
  • public/images/penguins/3.webp
  • public/images/penguins/4.webp
  • public/images/penguins/5.webp
  • public/images/penguins/6.webp
  • public/images/penguins/7.webp
  • public/images/penguins/8.webp
  • public/images/penguins/9.webp
  • public/images/supporters/canva.webp
  • public/images/supporters/cloudflare.webp
  • public/images/supporters/fibery.webp
  • public/images/supporters/github.webp
  • public/images/supporters/monday.webp
  • public/images/supporters/okta.webp
  • public/images/supporters/sentry.webp
  • public/images/supporters/techsoup.webp
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/trigger.advanced-tasks.mdc)

Use useTaskTrigger hook from @trigger.dev/react-hooks for frontend task triggering with proper accessToken handling

Files:

  • components/pages/home/hero.tsx
  • components/pages/home/donate-cta.tsx
  • components/pages/home/testimonials.tsx
  • components/pages/home/supporters.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (.cursor/rules/trigger.realtime.mdc)

**/*.{tsx,ts}: Use useTaskTrigger hook for basic task triggering and useRealtimeTaskTrigger for real-time status updates in React frontends
Use useRealtimeRun hook to subscribe to specific run updates and useRealtimeRunsWithTag to subscribe to tagged runs in React components
Use useRealtimeStream hook with defined stream types for consuming streamed data in React with type safety and throttle control
Use useWaitToken hook to handle approval/completion of wait token operations in React components
Use useRun SWR hook with refreshInterval: 0 (disabled polling) for one-time run data fetches in React instead of realtime subscriptions

Files:

  • components/pages/home/hero.tsx
  • app/metadata.ts
  • components/pages/home/donate-cta.tsx
  • components/pages/home/testimonials.tsx
  • components/pages/home/supporters.tsx
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/trigger.scheduled-tasks.mdc)

**/*.ts: Use imperative schedule creation via schedules.create() API for dynamic/multi-tenant scenarios with task ID, cron pattern, timezone, externalId, and deduplicationKey
Always provide externalId in multi-tenant scheduled task contexts and use deduplicationKey to prevent duplicate schedule creation on repeated calls
For one-off future task runs (non-recurring), use the delay option instead of cron schedules
Use schedules.retrieve(), schedules.list(), schedules.update(), schedules.deactivate(), schedules.activate(), and schedules.del() for SDK-based schedule management

Files:

  • app/metadata.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Seer Code Review
  • GitHub Check: Sourcery review
🔇 Additional comments (4)
components/pages/home/donate-cta.tsx (1)

11-15: LGTM — WEBP background swap is consistent.

components/pages/home/testimonials.tsx (1)

89-96: LGTM — avatar asset switch looks fine.

components/pages/home/supporters.tsx (1)

7-39: LGTM — supporter logos moved to WEBP.

components/pages/home/hero.tsx (1)

21-160: LGTM — WEBP icon updates and loading hints look good.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +137 to 138
icon: '/images/logo.webp',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

find . -name "metadata.ts" -o -name "metadata.tsx" | head -20

Repository: allthingslinux/allthingslinux

Length of output: 90


🌐 Web query:

Next.js metadata API icon WebP support favicons

💡 Result:

Short answer: Next.js's file-based metadata/icon conventions do not list WebP as a supported favicon/icon format — favicons (favicon) expect .ico and icon supports .ico/.jpg/.jpeg/.png/.svg (and apple-icon uses jpg/png). Next.js' Image optimization can produce WebP for image assets, but the metadata/file-conventions system won't automatically treat a .webp favicon the same way as .png/.ico. You can still add a manual in your layout/head if you want to serve a WebP icon, but browser support and search-engine behavior can vary, so providing an .ico or PNG fallback is recommended.
Sources: Next.js docs for app icons and file-based metadata [1][2], Next.js Image formats (WebP support via image optimization, separate system) [3].

References

  • Next.js: favicon, icon, and apple-icon file conventions. [1]
  • Next.js: Metadata & favicons (file-based metadata overview). [2]
  • Next.js Image component / formats (WebP via image optimization). [3]

🌐 Web query:

browser support WebP favicon 2024 2025

💡 Result:

Short answer

  • WebP is widely supported for normal images in 2024–2025, but using WebP as a favicon is inconsistent across browsers. Use WebP only with fallbacks (ICO/PNG/SVG). [1][2][3][4]

Details (key points)

  • Chrome / Chromium-based browsers: will accept favicon.webp in practice. [1][3]
  • Firefox: recent releases handle WebP favicons (reports and tests show support in current versions). [3]
  • Safari / iOS Safari: WebP for general images is supported, but favicon support for WebP is unreliable / not broadly supported—Safari prefers PNG/ICO/Apple-touch icons. Test and provide PNG/ICO fallbacks. [2][4]
  • Overall guidance: keep a classic favicon.ico plus PNG (and optionally SVG for desktops) and include WebP only as an extra; or serve WebP via the site manifest/picture with fallbacks to ensure all browsers see a favicon. [2][4]

Sources

  1. Can I use — link-icon/png & related favicon support. [caniuse data]. [1]
  2. Favicon format guidance / compatibility (favicononline / IconMaker 2024–2025 guidance). [2]
  3. Discussion and tests re: WebP/AVIF favicons (Fyrd/caniuse issue + browser test reports). [3]
  4. Practical notes about Safari favicon behavior and fallbacks (Framer / blog posts). [4]

If you want, I can: a) detect which browsers your visitors use and produce a recommended favicon set (ICO + PNG sizes + optional SVG/WebP), or b) give exact examples with fallbacks. Which do you prefer?


🏁 Script executed:

cat -n app/metadata.ts | head -150 | tail -40

Repository: allthingslinux/allthingslinux

Length of output: 1437


🌐 Web query:

Next.js metadata icons.icon property array of objects syntax

💡 Result:

Use the metadata API's icons map (not a flat array) or the Icon array shape. Each icon entry is an IconDescriptor object with at least url and optional type, sizes, rel, color, media, etc.

Minimal examples (TypeScript / app/layout.tsx):

  • icons as grouped object (recommended)
    export const metadata = {
    icons: {
    icon: [
    { url: '/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
    { url: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
    ],
    apple: [
    { url: '/apple-touch-icon.png', sizes: '180x180' },
    ],
    shortcut: '/favicon.ico',
    other: [
    { rel: 'mask-icon', url: '/safari-pinned-tab.svg', color: '#000000' },
    ],
    },
    }

  • icons as a simple array of descriptors (also supported)
    export const metadata = {
    icons: [
    { url: '/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
    { url: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
    ],
    }

Notes

  • URL key name is url (not src) when using Next.js metadata objects.
  • Valid fields: url (string | URL), type (MIME), sizes (e.g. "32x32" or "any"), rel (overrides inferred rel), color (for mask icons), media, etc.
  • You can also use the file-based app/icon and app/apple-icon conventions or generate icons with an icon route.

Sources: Next.js docs for app icons and metadata file conventions and the metadata types (Icon / Icons shape). [1][2]

References
[1] Next.js — favicon, icon, and apple-icon (file conventions).
[2] Next.js metadata types — Icon / Icons (type definitions).


🏁 Script executed:

rg "icons:\s*{" app/metadata.ts -A 10 -B 2

Repository: allthingslinux/allthingslinux

Length of output: 156


🏁 Script executed:

rg "icons" app/metadata.ts -B 5 -A 5

Repository: allthingslinux/allthingslinux

Length of output: 354


🏁 Script executed:

find . -name "logo.png" -o -name "logo.webp" -o -name "favicon*"

Repository: allthingslinux/allthingslinux

Length of output: 408


Add PNG fallback for favicon compatibility.
Next.js metadata does not officially support WebP for favicons, and Safari/iOS have inconsistent WebP favicon support. The repository has logo.png available; provide it as a fallback to ensure favicons display reliably across browsers.

-  icons: {
-    icon: '/images/logo.webp',
-  },
+  icons: {
+    icon: [
+      { url: '/images/logo.webp', type: 'image/webp' },
+      { url: '/images/logo.png', type: 'image/png' },
+    ],
+  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
icon: '/images/logo.webp',
},
icon: [
{ url: '/images/logo.webp', type: 'image/webp' },
{ url: '/images/logo.png', type: 'image/png' },
],
},
🤖 Prompt for AI Agents
In `@app/metadata.ts` around lines 137 - 138, The metadata object's icon currently
uses a single WebP path (icon: '/images/logo.webp'); update the metadata export
so the icon field provides a PNG fallback for browsers that lack WebP favicon
support by replacing the single string with an array of icon entries (first the
WebP URL, then the PNG URL) or by adding an additional icon entry pointing to
'/images/logo.png' alongside the existing WebP entry; locate the icon property
in the metadata object in app/metadata.ts and add the PNG fallback entry.

@kzndotsh kzndotsh merged commit 6e667f7 into allthingslinux:main Jan 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments