Webpage images: Jpg, Png or webP?
Webpage and internet speed are connected. Webpage must load as fast as possible. Webpage that lags are hated by visitors. Thus speed is very important part of your webpage and technology.
In the past, webpage is mostly text but today it is more of images and videos. Therefore speed is critical.
In this context Chrome is the King. Internet Explorer is clumsy, buggy and they do not follow the internet standard but bogs down with their own idiosyncrasies. Microsoft Edge is touted to be upto the modern technology but let us see.
If you don’t believe me try to load my website, www.itibetan.org, in Internet Explorer. It will not work. However, it will work in all other browser including Microsoft Edge. Internet Explorer is bad for the industry with too much holes for hackers to thrive. It is safer for your computer to ditch IE and download Chrome instead from here.
Google has introduced an image format called webP which is different from Jpg or Png format. WebP format is much smaller in size, in some case it can reduced Jpg format image by 50 percent in file size. Even 20 percent smaller image file loads much faster.
Today, only Chrome browser supports WebP format. Rests of the browsers are following Google much slower. Microsoft Edge, Firefox and Safari are offering support next year.
Google has offered a command line program that can convert Jpg to WebP and WebP to Jpg format. There is no way to perform such conversion in bulk- folder with many jpg files. However, you can write a small batch file(computer jargon: Command line program with “bat” extension instead of TXT) that can
perform Image Conversion in a folder with multiples Jpg files.
You can copy and paste following text(I wrote it and I give you full right to use it) in a Notepad and save it as AnyName.bat. Extension must be bat and
filename can be anything. It is a cmd or Command line Program. Note: you should not change the way it is written- newlines will not work.
echo Converting image from jpg to webP format in batch
set /p sz=Enter Image quality(100, 80, 50)-80 is best choice which is default:
FOR %%f IN (*.jpg) DO cwebp -q %sz% "%%~nf".jpg -o "%%~nf".webp
Above batch file looks for jpg in the active folder. You can change jpg to png. File quality 80 offers best compromise between file size reduction and
picture quality. If you want good quality with bit less compression ratio then go for 100.
If you are unfamiliar with path etc. then keep all the jpg file, exe, bat in the one folder and run the bat file. It should work.
If you have not used Cmd or you are new to command line program then this program is not for you.
Also, you need to download two small programs: cwebP.exe and dwebP.exe. Command line Program cwebP converts Jpg file to webP format and dwebP
program converts webP format back to Jpg.
You can download these two files here
Look for your Operating System, Windows 64 bits or 32 bits and download the zip files
When your webpage has one to two photos, file size is not much of an issue but if you want to share your summer trip photos with your friend, 20 percent
reduction in size is a big deal.
Here are the comparisons of my Buddha images.
note: if you are not using Chrome browser, today- dec- 2018, you may not see the image 2 and image 3.
First image is regular jpg of dimension 1450X2030 pixel of 2,507kb. Second image is webP format. It is the same image of same dimension with quality of
100 and its size is mere 1,126 kb. You can see for yourself that there is no difference is quality at all but file size is reduced by more than 50 percent (55%
precise). Now check out the third image with 80 quality index for webP format. It too has identical picture quality but its’ size is way, way smaller- just
371kb (85.2% less).
Image below 1: Jpg format with dimension 1450X 2030 pixel and file size 2,507kb
Image below 2: webP format of same dimension with 100 quality index. Files is reduced by 55%; file size is 1,126kb
Image below 3: webP format of same dimension with 80 quality index. Files is reduced by 85.2%; file size is just 371kb