25 Feb

Change Thumbnail Quality in WordPress

I notice that WordPress has really really poor thumbnail image quality when I upload my photos online. It really spoil a photo or even discourage people to view/click your photo.

To change the thumbnail image quality:

Edit File:

if (!imagejpeg( $thumbnail, $thumbpath ) ) {

if (!imagejpeg( $thumbnail, $thumbpath, 90 ) ) {

90 is the image quality of your thumbnail. My personal experience is that 85-90 are of very good quality. Not encourage to use 100 as it will generate big file size with virtually very little different in image quality.

Here’s the thumbnail from original WordPress default setting (I used trial and error to check the compression setting of WP default, should be around 60-65%, which is definitely TOO POOR for photography work):

File size = 19.52 KB


Here’s after (80):

File size = 22.31 KB


Here’s after (85):

File size = 26.22 KB


Here’s after (90):

File size = 33.06 KB


Here’s after (95):

File size = 47.69 KB


Here’s after (100):

File size = 94.14 KB


Hope this helps. ­čÖé

4 thoughts on “Change Thumbnail Quality in WordPress

  1. hi king

    now ´╝îthe code of 2.65 had lots of updata and changes, this method for v2.3 is no longer work.

    do you know to change the code in wordpress 2.6.5 or higher version ?


  2. Hi dodo,

    Sorry, I am keeping my WP at lower version for this blog site, not sure how to change the codes in higher version of WP. I just don’t like the FLASH type of gallery or photo upload in the new WP.

  3. It is in the same file, but function is different (version: 2.8.4):

    if ( imagejpeg( $dst, $dst_file, apply_filters( ‘jpeg_quality’, 60, ‘wp_crop_image’ ) ) )

    You can change 60 to anything you want. Bigger values means more clean pictures but also more file sizes.

  4. Hi there just wanted to give you a quick heads up. The words in your post seem to be running off the screen in Opera. I’m not sure if this is a format issue or something to do with web browser compatibility but I figured I’d post to let you know. The layout look great though! Hope you get the problem fixed soon. Many thanks

Leave a Reply