fablabbcn / fablabbcn-legacy-web

Fab Lab Barcelona legacy website
https://legacy.fablabbcn.org
4 stars 11 forks source link

Reduce size of the repo (3GB) by removing huge images and files #2

Open viktorsmari opened 6 years ago

viktorsmari commented 6 years ago

UPDATE: @Katearmstrong4 and I discussed that we don't need ALL the images so we should be able to resize this considerably.

  1. ALL images have been copied to Flickr https://www.flickr.com/photos/fablabbcn where all our images should live from now on.
  2. We should keep profile pics, logos etc in this repo, but move bigger images to Flickr
  3. Research and discuss which images we need in the repo.
  4. Remove the unwanted images with the git rm img/myimage.jpg which should make the repo smaller in size

    Cloning the repo takes a long time, because the size of it is 3.5 GB

Here is a part list of huge images we might consider reducing the size of.

The list is generated with the command:

| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| sed -n 's/^blob //p' \
| sort --numeric-sort --key=2 \
| cut -c 1-12,41- \
| numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest

...

8561870e26fc  7.0MiB img/fabpro/leka_gral/mirror/img 19.jpg
4a346ffb6887  7.2MiB img/blog/blog_loop_latest/ludovic-madeat-eu.jpg
f1ee34626574  8.3MiB img/blog/blog_loop_latest/makersfaire2016/dsc_5949.png
0ffeffaff2f1  8.9MiB img/blog/blog_loop_latest/makersfaire2016/dsc_5970.png
a3de3d5ab908  9.3MiB img/blog/makerfaire_barcelona16/dsc_6211.png
0ad1e4d0637c  9.7MiB img/blog/makerfaire_barcelona16/dsc_6216.png
71aaf7ba8bc7   10MiB img/blog/blog_loop_latest/dsc_8659.png
e12065be198d   11MiB img/blog/blog_loop_latest/dsc_8230.png
24766f537753   11MiB img/blog/blog_loop_latest/dsc_8621.png
0312166010c9   11MiB img/fabpro/leka_gral/panneling/panneling (3).jpg
d0d399004574   12MiB img/blog/blog_loop_latest/makersfaire2016/santi.png
7b096adb71cb   13MiB img/blog/blog_loop_latest/onascimento-madeat-eu.jpg
55adf70d03fc   14MiB img/blog/makerfaire_barcelona16/dsc_6228.png
c35e57c4187a   15MiB img/blog/blog_loop_latest/dsc_8262.png
d28fe9943a05   16MiB img/blog/blog_loop_latest/dsc_8463.png
24afa8c282ff   20MiB img/news_banner/logo_fab_city.jpg
74921edf3a95   21MiB img/blog/blog_loop_latest/dsc_86211.png
9d33b8d306ff   23MiB img/blog/blog_loop_latest/frontphototemplate.psd
c848e98bf9c8   57MiB img/ImageSliderImages.psd
viktorsmari commented 5 years ago

One way to make images smaller in size is: jpegoptim --size=400k *.jpg

Another is to also make them use less pixels. Many images are 3456x2304, or more and we can convert them to 1080x or more.

convert puerta.jpg -quality 50% -resize 1024x puerta.jpg

Resize multiple images to 1600 find . -iname \*.jpg -exec convert -verbose -quality 80 -resize 1600\> "{}" "{}" \;