Page 1 of 1

Image Compression and WebP Format

Posted: Sat Jan 04, 2025 4:18 am
by hoxesi8100@
JavaScript and CSS Optimization
JavaScript code , used for the interactive features of a page, and CSS code , used to define the visual style, are two essential elements of every website and must be carefully optimized. In particular, regarding JS scripts, it is advisable to eliminate all those that are not strictly necessary and that only slow down the loading of the pages. Methods such as defer and delay allow you to delay the execution of the scripts, greatly increasing the initial loading speed.

Even when it comes to CSS code, it is advisable to clean up unused style sheets.

Minification of HTML, JS and CSS
Another useful operation to perform to speed up Wordpress is to minify . This involves reducing the size of the source code by removing useless elements (such as comments) that slow down the loading of the page job seekers database and concatenating JS scripts and CSS sheets. However, you must be careful when minifying: this operation can sometimes be counterproductive, as it also impacts the TBT (Total Blocking Time).

In most Wordpress sites, images are the heaviest and most expensive assets to load. For this reason, it is essential to adequately compress all images and always use adequate resolutions. The modern WebP format , now supported by most browsers, allows you to further optimize images on Wordpress, saving space and reducing loading times.

A useful free online tool to optimize images and convert them to WebP format is: https://shortpixel.com/online-image-compression

Serving Google Fonts Locally
A large number of websites use Google Fonts , which are free typographic sets made available by Google and served through its CDN (content delivery network). To reduce the number of external requests for a site, thus improving speed and privacy, it is possible to upload the fonts in use directly to our server and then serve them locally .