OperationCode / operationcode_frontend

Front-end repository for live site. Please go to `front-end` repo to contribute instead.
https://operationcode.org
MIT License
101 stars 222 forks source link

Minify images for performance boost #926

Closed kylemh closed 6 years ago

kylemh commented 6 years ago

Description of changes

Many images were unjustifiably large or "dense". The biggest culprits have been reduced in file size and/or image dimensions.

Also remove malfunctioning image size checking script.

Issue Resolved

Fixes #917

jjhampton commented 6 years ago

@kylemh I'd like to be able to review this as promised, but the imageSize.js check isn't working on either of my machines. I've ran on Windows 10 and Linux/Ubuntu, both w/ Node 8.10.0, and it always passes (even with a large file added into the /src/images directory beyond the threshold). Unless it's a problem w/ my setup, I'll open a bug issue for that. In the meantime, someone else can review this.

kylemh commented 6 years ago

The image file size check isn't working on my end either. I'll scrap it in this PR. I'll ask for a ticket to be created for a new image file size script - there's one that integrates with lint-staged too

kylemh commented 6 years ago

For now, you can confirm the file sizes by clicking view on each individual image.

Here they are (in kb) in order of appearance on FILES CHANGED: 94.439, 271, 144, 64.5, 123, 58.8, 36.2, 69, 99.2, 24.4, 162, 37.4

kylemh commented 6 years ago

I dropped the imageSize script and will merge this for the immediate performance boost.

I'll make a new issue to add a build tool for image minimization.