Skip to content

Converts all PNG images in website/ to WebP format to reduce repository size and improve page load performance#934

Draft
VelmiraS wants to merge 7 commits into
masterfrom
chore/optimize-website-assets
Draft

Converts all PNG images in website/ to WebP format to reduce repository size and improve page load performance#934
VelmiraS wants to merge 7 commits into
masterfrom
chore/optimize-website-assets

Conversation

@VelmiraS
Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:
Converts 252 PNG images in website/ to WebP format, reducing repository
size by ~100MB (~70%). Also adds two reusable scripts for future asset
optimization and updates all markdown/vue references accordingly.

JPG/JPEG photos are intentionally kept unchanged — re-compressing them
causes visible quality loss.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
Some PNG files in the repository are photographs saved as PNG instead of JPG
(e.g. hackathon group pictures like 2025-07.png, 2025-06.png). After
converting to WebP at quality 85, these appear slightly washed out compared
to the originals.

Please advise on preferred approach:

  1. Accept current quality (still ~70% smaller)
  2. Increase quality to 90-92 (less savings)
  3. Exclude hackathon group pictures from conversion

@gardener-prow gardener-prow Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Apr 14, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 14, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: a569ae23-6f83-4301-ae4b-ccbc7b16fc99

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/optimize-website-assets

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 14, 2026

Deploy Preview for gardener-docs ready!

Name Link
🔨 Latest commit 0fcc6a3
🔍 Latest deploy log https://app.netlify.com/projects/gardener-docs/deploys/6a08ae370428cd0008f328b8
😎 Deploy Preview https://deploy-preview-934--gardener-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@gardener-prow gardener-prow Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cla: no Indicates the PR's author has not signed the cla-assistant.io CLA. labels Apr 14, 2026
@BoHristova
Copy link
Copy Markdown
Contributor

Thank you!

Could you please follow the instructions for signing the Contributor License Agreement. You only have to do it once ;)

@BoHristova BoHristova added the kind/enhancement Enhancement, improvement, extension label Apr 14, 2026
@gardener-prow gardener-prow Bot added cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. cla: no Indicates the PR's author has not signed the cla-assistant.io CLA. labels Apr 14, 2026
Copy link
Copy Markdown
Member

@klocke-io klocke-io left a comment

Choose a reason for hiding this comment

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

Nice, thanks for pushing this topic,

Could we add a mini check on CI for PR`s that we do not allow assets over a reasonable size, maybe check what is recommended for this? 1MB is probably quite large.

Also, we should add this transformation to the build pipeline in Netlify after we pull the rest of the content through DocForge. We then need to use a different target, though.

Comment thread .docforge/config Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay, wow 😳 that change in tone is quite dramatic 😅 whereas in the image above, I feel like the change is not noticeable.

Maybe for the first step we just exclude them and covert them to jpg for the time being

Comment thread website/documentation/getting-started/images/podrick/icon_gilly_scaling.png Outdated
Comment thread scripts/optimize-assets.mjs
Comment thread scripts/optimize-assets.mjs Outdated
// Parse args
const DRY_RUN = !process.argv.includes('--write')
const dirArg = process.argv.find((a, i) => process.argv[i - 1] === '--dir')
const TARGET_DIR = join(ROOT, dirArg ?? 'website')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
const TARGET_DIR = join(ROOT, dirArg ?? 'website')
const TARGET_DIR = join(ROOT, dirArg ?? 'website')Add a comment on line R23Add diff commentMarkdown input: edit mode selected.WritePreviewAdd a suggestionHeadingBoldItalicQuoteCodeLinkMore Formatting tools itemsSaved replies```suggestion
```Add FilesPaste, drop, or click to add filesCancelCommentStart a review
// Only convert PNG files — JPG/JPEG are photos that lose quality when re-compressed
const CONVERTIBLE = ['.png']
const SKIP_BELOW_KB = 5
// These files must stay as PNG — browsers require specific formats for them
const SKIP_FILENAMES = new Set([
'favicon.png',
'favicon-16x16.png',
'favicon-32x32.png',
'favicon-96x96.png',
'apple-touch-icon.png',
'web-app-manifest-192x192.png',
'web-app-manifest-512x512.png',
])

How about we extract those configurations to the make file and call the script/scripts from there, so that the scripts stay independent from our project 🤗

This would make it easier to package them and reuse them later.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The two scripts have been merged into one as suggested. The configuration has also been moved to the Makefile, so the script stays project-independent.

@gardener-prow gardener-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 16, 2026
@VelmiraS VelmiraS self-assigned this May 5, 2026
VelmiraS and others added 5 commits May 15, 2026 09:21
- Convert 252 PNG files to WebP (quality 85)
- Keep JPG/JPEG photos unchanged (no re-compression quality loss)
- Update all .md/.vue references to use .webp
- Skip favicons and web manifest icons (must stay PNG)
- Add scripts/optimize-assets.mjs for future conversions
- Add scripts/update-asset-refs.mjs for updating references
@VelmiraS VelmiraS force-pushed the chore/optimize-website-assets branch from e9441dd to 056b190 Compare May 15, 2026 06:25
@gardener-prow gardener-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 15, 2026
@VelmiraS VelmiraS force-pushed the chore/optimize-website-assets branch 3 times, most recently from b963c12 to ff89cab Compare May 15, 2026 06:37
@VelmiraS VelmiraS force-pushed the chore/optimize-website-assets branch 6 times, most recently from 897fabb to bc62a2a Compare May 15, 2026 07:13
@VelmiraS VelmiraS force-pushed the chore/optimize-website-assets branch from bc62a2a to 60f70ac Compare May 15, 2026 07:20
@gardener-prow gardener-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 15, 2026
@gardener-prow gardener-prow Bot added the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label May 16, 2026
@gardener-prow
Copy link
Copy Markdown

gardener-prow Bot commented May 16, 2026

Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@gardener-prow gardener-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 16, 2026
Copy link
Copy Markdown
Member

@klocke-io klocke-io left a comment

Choose a reason for hiding this comment

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

/lgtm

thanks for bringing this in :)

@gardener-prow gardener-prow Bot added the lgtm Indicates that a PR is ready to be merged. label May 20, 2026
@gardener-prow
Copy link
Copy Markdown

gardener-prow Bot commented May 20, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: klocke-io

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 20, 2026
@gardener-prow
Copy link
Copy Markdown

gardener-prow Bot commented May 20, 2026

LGTM label has been added.

DetailsGit tree hash: a5c687a1ccf3117582919ed20b10ef33313ba0e7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants