Skip to content

Conversation

@sfanahata
Copy link
Contributor

@sfanahata sfanahata commented Dec 9, 2025

  • Compressed 88 PNG images using pngquant + optipng
  • Reduced images from ~70MB to ~18MB (~52MB savings)
  • All PNGs previously over 1MB are now under 1MB
  • This helps address the Vercel 250MB serverless function limit

Note: Large GIF files still need attention. Will open a separate branch to address.

DESCRIBE YOUR PR

Tell us what you're changing and why. If your PR resolves an issue, please link it so it closes automatically.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

- Compressed 88 PNG images using pngquant + optipng
- Reduced images from ~70MB to ~18MB (~52MB savings)
- All PNGs previously over 1MB are now under 1MB
- This helps address the Vercel 250MB serverless function limit

Note: Large GIF files (29MB total) still need attention -
recommend converting to MP4/WebM for additional savings
@vercel
Copy link

vercel bot commented Dec 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
develop-docs Ready Ready Preview Comment Dec 9, 2025 7:06am
sentry-docs Ready Ready Preview Comment Dec 9, 2025 7:06am

@codecov
Copy link

codecov bot commented Dec 9, 2025

Bundle Report

Changes will increase total bundle size by 465 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 24.66MB 471 bytes (0.0%) ⬆️
sentry-docs-client-array-push 10.23MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 5.46MB -0.0%
6529.js -3 bytes 4.88MB -0.0%
../instrumentation.js -3 bytes 4.78MB -0.0%
../app/[[...path]]/page.js.nft.json 160 bytes 1.06MB 0.02%
../app/platform-redirect/page.js.nft.json 160 bytes 1.06MB 0.02%
../app/sitemap.xml/route.js.nft.json 160 bytes 1.05MB 0.02%
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 893.1kB -0.0%
static/chunks/9366-*.js -3 bytes 437.05kB -0.0%
server/middleware-*.js 6.46kB 7.46kB 645.5% ⚠️
server/middleware-*.js -6.46kB 1.0kB -86.59%
static/oMQRqFYho30m0YR3FpqiF/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/oMQRqFYho30m0YR3FpqiF/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/hb9jLzRauhngPzK5-*.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
static/hb9jLzRauhngPzK5-*.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️

@BYK
Copy link
Member

BYK commented Dec 9, 2025

This is pretty great but I think we need a permanent solution where we add the optimization step to the build. This way we can keep the originals and don't rely on people remembering (they won't) to optimize the images.

Copy link
Contributor

@jaffrepaul jaffrepaul left a comment

Choose a reason for hiding this comment

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

This is a nice bump to combat the issue for now. Images are the sole offender here, I started a branch to fix this that I didn't get merged. I'll dig that up and see if I can't make moves there.

Ultimately a lot of these old UI images need to be updated any way. Agree there should be something added to the build step to help govern image size.

Let's pull out the codeowner bit to it's own PR to keep this one single responsibility.

# Remove @ symbol from reviewer name
REVIEWER_NAME=${REVIEWER#@}
if [[ "$REQUESTED_REVIEWERS" == *"$REVIEWER_NAME"* ]]; then
echo " - $REVIEWER_NAME is already a requested reviewer, skipping"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would pull this out to its own PR since it's not related and would be easier to isolate if needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah, sorry, I was playing around with it and forgot to remove it.

@codeowner-assignment codeowner-assignment bot requested a review from a team December 9, 2025 18:35
@sfanahata sfanahata requested a review from jaffrepaul December 9, 2025 18:35
@sfanahata sfanahata merged commit 6b967c1 into master Dec 9, 2025
21 of 23 checks passed
@sfanahata sfanahata deleted the optimize-images branch December 9, 2025 19:08
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.

4 participants