I am uploading to my site large images with media uplader and I want them to have 100% quality but wordpress reduces the quality. What should I do or what plugin to install to prevent this?

  • Is your theme using the original or a resized version?
    – Milo
    Commented Sep 20, 2015 at 16:26
  • I upload them with the media library and i call them with wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); Commented Sep 20, 2015 at 16:29
  • The full size is untouched by default, the quality of that should not be changing.
    – Milo
    Commented Sep 20, 2015 at 16:34
  • But it does this is the problem... Commented Sep 20, 2015 at 16:58
  • 2
    are you using a core theme and no plugins? have you looked in the uploads folder and verified that filesize is changing?
    – Milo
    Commented Sep 20, 2015 at 17:08

1 Answer 1


WordPress by default compress and lower image quality. To disable it please enter this code in functions.php file of your theme.

add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );
  • Correct in approach, but create_function() is obsolete. Use modern anonymous function function() { return 100; } instead.
    – Rarst
    Commented Sep 20, 2015 at 20:55
  • so does WordPress now compress the original size? because it never used to.
    – Milo
    Commented Sep 21, 2015 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.