Skip to content

perf: upgrade website and docs images to WebP - #190

Open
imrja8 wants to merge 4 commits into
Dokploy:mainfrom
imrja8:perf/optimize-website-and-docs-images-to-WebP-format
Open

imrja8 wants to merge 4 commits into
Dokploy:mainfrom
imrja8:perf/optimize-website-and-docs-images-to-WebP-format

Conversation

@imrja8

@imrja8 imrja8 commented Sep 19, 2026

Copy link
Copy Markdown
video.mp4

While the Dokploy website is already fast, images can sometimes lag behind the text on slower connections. Video demonstrating Dokploy website image slow load even with a 200mbps connection.

What does this PR do?

This PR optimizes the website and documentation by converting .png visual assets to .webp and updating the corresponding codebase references.

Images were converted using cwebp with maximum lossless compression (-lossless -z 9) to ensure 99.9% pixel-perfect original quality with zero visual degradation.

Using WebP cuts the image payload significantly, ensuring visuals load much closer to the speed of the content. At Dokploy's scale, this also noticeably reduces server egress bandwidth, improves the Largest Contentful Paint (LCP), and prevents layout shifts.

Size Reductions

Overall, this permanently removes ~12.6 MB from the codebase.

/apps/website/public

  • Before: ~6.7 MB
  • After: ~3.3 MB
  • Savings: ~3.4 MB (~51% reduction)
  • Converted: 41 images

/apps/docs/public

  • Before: ~16.3 MB
  • After: ~7.1 MB
  • Savings: ~9.2 MB (~56% reduction)
  • Converted: 93 images

Note: Comparision file sizes are calculated using macOS Base-10 metric, where 1 MB = 1,000,000 bytes. There may be slight differences in reported megabyte sizes depending on OS and file size calculation system, these numbers were calculated on Mac Air M3. The percentage comparison serve as a more universally accurate metric.

Additional Details

  • Hardcoded URLs: Updated Hero.tsx and pricing-legacy.tsx to use a relative path (/banner.webp) instead of the absolute URL (https://dokploy.com/banner.png) so the hero banner resolves properly when testing locally or on preview deployments.
  • Ignored Metadata: Safely skipped SEO and favicon assets (og.png, apple-touch-icon.png, favicon.png) to keep platform fallback compatibility intact.

Testing & Verification

Because there are over 130 images changed, I couldn't check every single page manually. Here is how I verified the changes:

  • Ran a project-wide search to make sure no old .png references were accidentally left behind in any .mdx or .tsx files.
  • Double-checked that the og.png and favicon files were correctly ignored by the replacement script.
  • Booted up both pnpm run website:dev and pnpm run docs:dev and clicked through a few main pages to make sure everything loads correctly and there are no broken image links.

@imrja8
imrja8 requested a review from Siumauricio as a code owner September 19, 2026 22:18
@imrja8 imrja8 changed the title perf: optimize website and docs images to WebP format perf: upgrade website and docs images to WebP Sep 19, 2026
@imrja8
imrja8 force-pushed the perf/optimize-website-and-docs-images-to-WebP-format branch 4 times, most recently from 673abf3 to 7a7d885 Compare September 19, 2026 22:47
@imrja8
imrja8 force-pushed the perf/optimize-website-and-docs-images-to-WebP-format branch from 7a7d885 to ec31ce5 Compare September 19, 2026 22:58
@imrja8

imrja8 commented Sep 21, 2026

Copy link
Copy Markdown
Author

@narcisonunez This pr is ready for review.

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.

1 participant