Skip to content

Improve SVG handling - #1990

Open
fturmel wants to merge 4 commits into
CodingTrain:mainfrom
fturmel:improve-svg-handling
Open

Improve SVG handling#1990
fturmel wants to merge 4 commits into
CodingTrain:mainfrom
fturmel:improve-svg-handling

Conversation

@fturmel

@fturmel fturmel commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

I reopened the source code for the website a few days ago and noticed I had been sitting on some SVG related optimizations that were never finished/merged.

This essentially replaces the gatsby-plugin-react-svg with @svgr/webpack so SVGs are automatically optimized by svgo. It's going to allow upgrading to newer React versions too, there were compat problems with that abandoned Gatsby plugin. The "*.mini.svg" files were removed, as well as some dupes.

The heavy hero train SVG on the homepage is also now 95% smaller (1.6mb to 90kb), which should make the page load faster and use up less bandwidth. It's still an SVG, but the large embedded PNG image inside it was scaled down and converted to a WebP image.

(I'm going to attempt to update the project dependencies over the coming days as well, watch out for another PR soon. Latest Gatsby version should be able to run on Node 24 which is the current LTS).

@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for codingtrain ready!

Name Link
🔨 Latest commit 05c503a
🔍 Latest deploy log https://app.netlify.com/projects/codingtrain/deploys/6a76157d86f21300082143d5
😎 Deploy Preview https://deploy-preview-1990--codingtrain.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.

@fturmel
fturmel marked this pull request as ready for review August 7, 2026 18:07
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