matrix-org / matrix.org

matrix.org public website
Other
422 stars 348 forks source link

PNGs are not opimised (performance issue) #706

Open jaller94 opened 4 years ago

jaller94 commented 4 years ago

Google Lighthouse identified that we ship PNGs with a larger file size than needed: Screenshot_2020-04-23_18-20-28

One script which may help is:

# Warning: If the optimization fails or the file can't be optimized, the file ends up as a 0 byte file
find . -name '*.png' -exec mv {} {}.old \; -exec pngcrush {}.old {} \; -exec rm {}.old \;
thibaultamartin commented 1 year ago

Zola seems to support image resizing out of the box, wich we're not making use of in the v1. We also rely heavily on svg rather than pngs/jpgs when possible

https://www.getzola.org/documentation/content/image-processing/