feat: compress media files #818

Merged
konrad merged 1 commits from dpschen/frontend:feature/compress-media-files into main 2021-10-03 18:48:02 +00:00

1 Commits

Author SHA1 Message Date
Dominik Pschenitschni 955bd73fec
feat: compress media files
continuous-integration/drone/pr Build is passing Details
I created a new folder called "originalMedia" where I move all the uncompressed images.
I moved most assets to the src folder. This makes the build a little bit slower but has the advantage that vite will can add a content hash.

I converted llama-nightscape to jpg because I got better compression results with that. Not sure if that makes sense though (because of todays high dpi displays).

Used for SVG: manual lossy (!) compression with SVGOMG https://jakearchibald.github.io/svgomg/
I would have loved to manually check the layers and see if I could combine / remove some manually.
That's an optimisation step that SVGOMG obviously can't do. Sadly Inkscape seems to have some stability problems when opening these SVGs... weird.
I did not compress the "safari-pinned-tab.svg" because SVGOMG seemed to have some problems with it.

Used tool for oll other images: ImageOptim v1.8.8 (sadly just for macOS, but it simply combines many image compression api under one GUI, combines them sometimes, lets them compete and uses the best outcome).
I stripped all meta data with a lossy (!) compression of 85% for JPEG, 80% for PNG (yes PNG supports lossy compression) and optimisation level "insane".
I enabled all supported compression algorythms except Guetzli (time is just too crazy)

I compressed the wav file with `ffmpeg -i pop.wav pop.mp3`.

Note: I realised that the full-pride logo has a different outer offset that the other logo (from the circle around the llama).
This seemed to be not by intend.
2021-10-03 17:52:27 +02:00