Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webdesign - jpg or png, which one is the best for web [closed]

Tags:

png

web

jpeg

I've been a web developer for quite some time, and I am used to transforming all my designs into the png file format in order to build my webpages. Despite the fact that png, contrary to jpg, allows transparency in the images, is it a better solution?

The question regards page loading time and best webdesign practices, as well as file size versus quality of the images.

What do you think is the best solution to use?

like image 266
yoda Avatar asked Nov 08 '09 23:11

yoda


People also ask

Is PNG or JPG better for websites?

Regular Pictures And while the graphics and the images with letters are usually better-looking in the . png file, with the regular photos, JPG is a better choice for the web because if the smaller size. If you decide to use PNGs only, they will slow your website which can lead to frustrated users.

What is the best format for getting photos off the web?

Webp is the best format for web. JPG and PNG are also good choices for the web. If your choice is between JPG or PNG, use JPG for photos and PNG for logos. That's because a JPG is better compressed and loads faster, whereas a PNG will retain more detail and allows for a transparent background.

Is PNG good for web?

PNG format is a lossless compression file format, which makes it a common choice for use on the Web. PNG is a good choice for storing line drawings, text, and iconic graphics at a small file size.

Is JPEG good for web?

If you want your site to load as fast as possible, and you don't mind sacrificing a bit of image quality, JPEG is the best image format for your needs.


2 Answers

It depends.

PNG is better for crisp images with a low number of colours,

JPG is better for a low-bandwidth image - however it is not as crisp and therefore not very good for GUI.

Generally, JPG is for photos and pictures, whereas PNG (or GIF) is for layout.

You may find this page interesting, as it goes over the basics of PNG vs GIF.

like image 151
Dean Rather Avatar answered Oct 31 '22 15:10

Dean Rather


Google has written about it very well. From Selecting the right image format, you can find a flow-chart to make the decision:

Selecting the right image format

like image 25
Rinku Avatar answered Oct 31 '22 14:10

Rinku