perf: convert the "slide" svgs with embedded base64 pngs to just pngs #29333
+4
−68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR needs a little more work, as the carousel where these images are used caches the image URLs into the metamask state the first time they are seen by the app. Updating the URLs (from svg to png) doesn't work, and actually breaks the images since the app will attempt to load the old svgs first.
The SVGs were 540.9KB, the PNGs are 193.8Kb.
"But wait", you probably interject. "SVGs are supposed to be better than PNGs for vector art!"
And you'd be right, but these SVGs aren't vector art; they are (mostly) just unoptimized PNGs embedded as a base64 encoded URL. The PNGs had some minor transforms, like rotation and squashing, applied, and in one instance, some weird blue angular shapes.
I maintained the spirit of the old SVGs in these new PNGs, but they aren't exactly pixel-perfect copies of the original SVGs.
"Why are these new PNGs so big now?" you might ask.
Well, that's just how big the embedded PNGs were inside the SVGs. I didn't enlarge anything. I kind of assume the creator of the SVGs knew the appropriate resolutions for the embedded images, and so I just rolled with that assumption (my hunch is that these images are just way too large for their intended use).
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist