Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Optimize images #63

Closed
pdehaan opened this issue Jun 8, 2017 · 1 comment
Closed

Optimize images #63

pdehaan opened this issue Jun 8, 2017 · 1 comment

Comments

@pdehaan
Copy link
Collaborator

pdehaan commented Jun 8, 2017

Randomly spotted while trolling your repo:

➜  something-awesome git:(master) ls -lash public/resources
total 5280
5160 -rw-r--r--  1 pdehaan  staff   2.5M Jun  7 22:03 background.png
  40 -rw-r--r--  1 pdehaan  staff    20K Jun  7 22:03 link_expired.png
  48 -rw-r--r--  1 pdehaan  staff    22K Jun  7 22:03 share.png
  32 -rw-r--r--  1 pdehaan  staff    13K Jun  7 22:03 upload.svg

Note that the public/resources/background.png is 2.5 MB. But we'll probably want to try running all the images through imagemin and/or svgo.

@pdehaan
Copy link
Collaborator Author

pdehaan commented Jun 9, 2017

Sorry, I should have listed the imagemin command for future travellers:

$ npm i imagemin-cli -D

# Before:
$ ls -lash public/resources
2.5M Jun  7 22:59 background.png
 20K Jun  7 22:59 link_expired.png
 22K Jun  7 22:59 share.png
 13K Jun  7 22:59 upload.svg

$ $(npm bin)/imagemin public/resources/* --out-dir=public/resources
4 images minified

# After:
$ ls -lash public/resources
1.4M Jun  9 14:36 background.png
 15K Jun  9 14:35 link_expired.png
 17K Jun  9 14:35 share.png
5.7K Jun  9 14:35 upload.svg

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants