How to Change the quality of your WordPress thumbnails images.

Thumbnails is very popular word in wordpress. The function creates different size of images for our wordpress site. Post Thumbnails is a theme feature was introduced with Version 2.9. It was quickly changed to Featured Images with Version 3.0. Thumbnail, now Featured Image, is an image that is chosen as the representative image for Posts, Pages or Custom Post Types. The display of this image is up to the theme. This is especially useful for “magazine-style” themes where each post has an image.

Some times we are facing issues with our thumbnail images that has been generated my wordpress. It may has low quality or heavier to download. When we are uploading any images through admin uploader, wordpress by default set 90% quality to the generated images. If you think that your cropped thumbnails don’t have a good enough quality? or it is much heavier to download ?. Here is solution to overcome from this type of situation.

The following code will help you to increase or decrease the thumbnail image quality of or generated images.
Just add the code to the theme function.php file.


/*  Set custom thumbnail quality ------------ */
function crayon_thumbnail_quality( $quality ) {
    return 100;
}
add_filter( 'jpeg_quality', 'crayon_thumbnail_quality' );
add_filter( 'wp_editor_set_quality', 'crayon_thumbnail_quality' );

Change value to anything you want. 95 would be the default max quality. The code also work any new version of wordpress.

Enjoy WordPress!!!

Comments

  1. Hi, I do believe this is an excellent website. I stumbledupon it 😉 I am going to
    return once again since i have book marked it. Money and freedom is the greatest way to change, may you
    be rich and continue to help others.

  2. hello!,I like your writing so much! proportion we keep in touch more about
    your post on AOL? I need an expert on this house to unravel my problem.

    Maybe that’s you! Looking forward to look you.

  3. I am really impressed with your writing talents as
    well as with the format on your blog. Is this a paid subject matter or
    did you customize it yourself? Anyway keep up the nice quality writing, it’s
    rare to peer a great blog like this one nowadays..

  4. Woah! I’m really digging the template/theme of
    this blog. It’s simple, yet effective. A lot of times it’s tough to get that “perfect balance” between usability and visual appeal.
    I must say you’ve done a great job with this.
    In addition, the blog loads very quick for me on Firefox.

    Superb Blog!

  5. I have read so many posts regarding the blogger lovers except this paragraph is actually a good paragraph,
    keep it up.

  6. naturally like your web-site however you need to check the spelling on quite a few of your posts.
    A number of them are rife with spelling issues and I find it very troublesome to
    tell the reality however I will surely come back again.

  7. I will right away take hold of your rss feed as I can not to find your e-mail subscription link
    or e-newsletter service. Do you have any?
    Kindly permit me know so that I could subscribe. Thanks.

  8. You actually make it seem so easy with your
    presentation but I find this matter to be actually something that I think I would never understand.

    It seems too complicated and very broad for me. I am looking forward for your next post, I’ll
    try to get the hang of it!

  9. Good way of explaining, and pleasant article to obtain data
    about my presentation subject, which i am going to convey in academy.

Leave a Comment