• Resolved max143

    (@max143)


    I want have 100% image quality in thumbnails. I added in functions.php this code add_filter('jpeg_quality', function($arg){return 100;}); But it does not work. Images before and after have the dame quality and size(kb).
    Also thumbnails were regenerated.

    • This topic was modified 8 years, 2 months ago by max143.
Viewing 4 replies - 1 through 4 (of 4 total)
  • It doesn’t disable compression in reality, it sets the quality to 100 which means it still performs compression. With jpegs, the more you use them the more quality they lose over time. They lose quality every time they go through optimization or saving (source). If you open jpeg in Photoshop, and save it without any edits, it will lose quality. With WordPress compression it’s the same. Every time you regenerate images in WP, they lose quality. It’s just the way jpegs are made.

    Uploading images via FTP would be the best option to preserve quality.

    Thread Starter max143

    (@max143)

    Thanks for answer. And if I use PNG, will it lose quality same as JPG?

    Moderator bcworkz

    (@bcworkz)

    Not the same as, but you will lose quality all the same. The compression methods are different so the results are different. Both use lossy compression though, so repeatedly re-compressing will degrade images either way.

    Even given the same compression method, the quality of the compressing algorithm varies by application. The compressor in GD, the usual image processor used by WP, is not very good IMO. As ProjectArmy suggests, using alternative, quality resizing applications such as Photoshop to get to the size you need and uploading via FTP is the best way to preserve quality.

    Thread Starter max143

    (@max143)

    Ok, thank You

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Post thumbnails quality’ is closed to new replies.