How to batch convert JPG images to progressive JPG images?

Progressive JPG images, as opposed to baseline JPG, will display them right away in the browser, and will load bits of it in cycle, rendering it from blur to clear.

Progressive is known to provide a better user experience, preventing the ”fax loading” effect. Where the image is displayed in full, but sequentially from top to bottom.

The imagemagick package will install the convert command that you can run to convert JPG to progressive:

convert -strip -interlace Plane -quality 80 input-file.jpg output-file.jpg

From there, it only takes a simple bash loop to batch convert several images at once:

for image in *.jpg; do
  convert -strip -interlace Plane -quality 75 $image $image;

PNG vs. GIF vs. JPEG vs. SVG – When best to use?

When should certain image filetypes be used when building websites or interfaces, etc?

What are their points of strength and weakness?

I know that PNG & GIF are lossless, while JPEG is lossy.
But what is the main difference between PNG & GIF?
Why should I prefer one over the other? What is SVG and when should I use it?