Tony McDonald

Computing & IT

Tony smiling at you

Learning Curve Journal

Tony McDonald


Twitter | GitHub | YouYube | ScienceTony

Compress Your Images To Speed Up Your webpage

04 Sep 2019


Task outline

Check webpage load time and speed up site. In order to achieve this, First, check the speed of my site using pageSpeed Insights from Google. Second, act upon analysis feedback and carry out at least one suggestion made.

Output or results of activity

I spent many hours looking for different ways to check the speed of my site but Googles pageSpeed insights was by far the best. The google resource made several suggestions including to ‘Serve images in next-gen formats’, which i followed up on. However, the recommended formats do not cover all the browsers. For instance, webP does not work with Safari! The problem I have is that the images in the slideshow are selected by the JS file, which is making it difficult to select the needed image for view port size and image type. It looks as though i will need to redo the slideshow using html instead of javaScript in order to use the picture element. Not to be deterred, I found a site that compresses jpeg file called compressjpeg.com and reduced the size of the image files by up to 85%. I further reduced file size by reducing the pixel size of the images. This will have to do until i change the slideshow from javaScript to html and css.

Comments on knowledge and skills demonstrated

What I Learned

There are next gen formats for images, but they do not yet cover all browsers. See webP browser support, jpeg 2000 and jpeg XR. This is very reminiscent of the browser wars of the 1980s.
Next gen formats:

Browser detection is possible using the picture element.

Resources:

pageSpeed Insights
WebP
Webp FAQ

Share on Tumblr
Share on LinkedIn
Share on Reddit
Share on Telegram