Suggestion: Downscale screenshot

Discuss development of the GhostBSD system website.

Moderator: Developer

Post Reply
graudeejs
Posts: 1
Joined: Thu Dec 27, 2018 1:05 pm

Suggestion: Downscale screenshot

Post by graudeejs »

Hello!

Here's a tip how to save bandwidth and improve GhostBSD homepage first visit performance:
You need to downscale screenshot visible on front page.

Effective maximum size of that image on GhostBSD homepage is 1140×480.933 (as on my 4K display fully maxed out browser).
However itself is 2560x1080. By downscaling this image you can reduce image size from 3.6M to 788K.

The screenshot is in PNG format, which if fine, but very big file. If you would consider converting it jpg you can reduce size from 3.6M to 1.3M (Given quality 95, I couldn't tell the difference in image quality)

Now combining all of this we can get 314K without much of a fuss, which is 10x improvement.

I've download front page and tried to apply custom image to compare with original. To my surprise it was way more blurry, than expected. After some experimenting I got best result with 2x the size of required image (My guess that this might be due to DPI difference and how KDE handles it, not really sure about that. Haven't been developing web pages on my current desktop setup).

Code: Select all

convert Screenshot_at_2018-10-20_13-22-41.png -scale x674 -quality 95 downscaled_Screenshot_at_2018-10-20_13-22-41.jpg
Here's end result comparison: https://share.berjoza.lv/GhostBSD-forums/comparison.png

In this screenshot you can compare image quality of 3.6M PNG image vs 778K JPG image.
Post Reply