četvrtak, 29. svibnja 2014.

How to create perfect quality images in Wordpress

-By default Wordpress uses 80-90% quality images and in some cases even down to 60%, and that's fine but in some cases you need best quality images (autobiogaphy, portfolio etc). Most people can't even spot the differences but that's not always the case.
-You can use this code for best quality images:

add_filter( 'jpeg_quality', 'smashing_jpeg_quality' );
function smashing_jpeg_quality() {
   return 100;
}

-Most common image extensions used online is JPG, mostly because they can apply heavy layers of compression and in process page will load faster. That's great for your page visitors and also for SEO.
But in process of compression you lose some of the picture quality which is not good, and if you duplicate that same image you will lose more quality and so on.
-And there is PNG extension which have much larger files and are very high quality, but problem is that yout page will load a little bit slower. No matter how much time you duplicate it, it will still have great quality.

-So it's up to you but make sure you keep image files between 100-150 kb.