Most of my posts on the blog have pictures. At some point, pictures have an 800kb size. Some less other more than that. In short: I have a bunch of pictures 4.5MB. So loading my sites was heavy for some users in China, Japan, Australia. Using Google Analytics and sites for web testing - I notice this issue. So the first moment was how to resolve?
I start digging on the net and find that most of my png could be converted to the JPEG 2000 format.
After running command like:
gm convert -define 'jp2:rate=0.008' 20200509173353-twittercard.png 20200509173353-twittercard.jpg
gm command is part of GraphicsMagick package.
Second thing - resizing pictures. Most of my pictures have more then 800x600, so I resize to 640x480. And win drastically speed.
convert 20200509173353-twittercard.jpg -resize 600x400\> 20200509173353-twittercard.jpg
From 4.5MB I went to less than 1MB. Also, I make a faster site to run. Small success but I love it.