Does it make sense to convert all images to PNG?

0 like 0 dislike
3 views

Imagine the situation


You need to increase traffic to your website. Had such a proposal: convert all images to the resource in a PNG format. The resource is still a small social network with the attendance of about 2,500 visits per day. There are about 3,500 profiles and of course the main images — photos, almost all in JPG format.

Question


Does it make sense to translate all images in PNG format and in the future, when you upload images also to convert them to PNG?
by | 3 views

7 Answers

0 like 0 dislike
In your case it makes sense to configure the server HTTP headers to cache images in browser for a few days (some people recommend even for a month). Level htaccess you can do this:
\r
\rExpiresActive on
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpeg A2592000
by
0 like 0 dislike
I think it is not necessary. Pictures in PNG it's weird. In PNG only icons, small design elements.
by
0 like 0 dislike
1. The principle of compression of the JPEG is based on splitting the image into squares of 8×8 pixels and fill those squares gradients. Suitable for photographs (where, by definition, a lot of gradients and little clear objects) and is not suitable for line art images of type schemes (for clarity, you should try to imagine getting, say, a single-pixel line when trying to represent it as a gradient of 8×8; it is also useful to consider this JPEG image at high magnification).
\r
2. The principle of compression of GIF and PNG-8 (not to be confused with PNG-24) is based on narrowing the color palette to a minimum, sufficient for more or less correct display of the image. By narrowing the palette, each color can be encoded by fewer bytes, this (in addition to algorithms archiving) and achieved compression. The maximum number of shades is 256. Accordingly, GIF and PNG-8 are well suited for subjectively lossless (encoded each pixel) compression of line images with solid areas and a small number of colors (logos, graphs, charts, etc.). and is NOT suitable for the vast majority of photographic images (photographs of a number of shades are usually much larger than 256, if not more, the size of the file is unnecessarily large, since the GIF/PNG-8 honestly encode each pixel of the image).
\r
3. PNG-24 (not to be confused with PNG-8) compression is generally lossless. In fact, specialized archiver for images. Accordingly, the volume of the output file most and usually much larger than GIF/PNG-8, and JPEG. Usually applied or, if necessary, lossless compression, or if you want to use transparency, either when you save the long, monotonous areas and/or unidirectional gradients (such gradients compress more efficiently than GIF/PNG-8).
by
0 like 0 dislike
What's the point? And so the image compression with losses, saving in PNG will not restore. But the place to take pictures. Such cases.
by
0 like 0 dislike
Formats should be used as directed. PNG is designed to store transparent images, JPEG for photographs and GIF for storing the most primitive graphics. Compression algorithms for each of the formats made specifically to fit your needs. If you save the photo in PNG, and the icon in jpage — their size will increase significantly. So your optimization will result in a huge brake ;-)
by
0 like 0 dislike
If the picture was compressed to JPEG, due to distortion, PNG it will shrink very badly.
If you have an uncompressed source, it makes sense to see what the encoder effectively work on specific kartice.
\r
Photos much better compressed JPEG's, logos, gradients, PNG.
by
0 like 0 dislike
Photos in JPEG, the rest of PNG.
GIF is out of date.
by

Related questions

0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
asked Apr 9, 2019 by uploadfor
0 like 0 dislike
2 answers
asked Apr 1, 2019 by McDoe254
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
28,647 users