Support » Fixing WordPress » WP reduces size of uploaded image

  • Hello,

    Whenever I upload an image to WP it reduces the original size, regardless of how small or big the uploaded original is. It even downsizes a 13 kbyte 370 x 238 image to around 7 kbyte. In the media library the column on the right shows the image size right, but when I put it into a post, and check the image properties in a browser, I invariably get a smaller size than that of the original uploaded. It happens to all images I upload regardless of size, but the extent of the downsizing varies with appearently no logic. Why could that happen?

    I only just started this blog and have not messed around with the source code at all.

    The blog is at:

    I use the Matheson theme but have switched to other themes to check if this is a problem with the theme, but the problem persisted.

    I would very much appreciate your kind help.


Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator Andrew Nevins


    Can you switch to the Twenty Fourteen/ Thirteen theme while we explore this issue?

    On the page you linked what image has the issue? Tell us what dimensions it has in your media library too.

    Why could that happen?

    Themes quite often change the original image size when images are uploaded. What they do is create duplicates of the original image and then crop them to the size they want. Why? It’s more efficient for loading times to load an image size of the exact dimensions as necessary.

    Andrew, thanks for your prompt reply. I switched to the Twenty Thirteen theme and uploaded a rather small image, and unfortunately the problem persists. I left the picture there for your reference (its name is “accordsezmarc3b.jpg”), it is in the first post on the page. The size of the original image I uploaded is 13 kB. This what WP also displays in the right data column in the Media Library if I click on the image (Dimensions are: 370 × 238). But when I post the picture, it is downsized to 7,14 kB. The dimensions actually remain the same: it is the image quality that is reduced (which can be quite annonying in a case like this, when the image is of quite poor quality already – and even that is downsized by half…)

    I left the Twenty Thirteen theme and this example image on in the blog for your kind reference.

    PS: This seems to happen to ALL the pictures I post, regardless of their original size – but the actual extent of downsizing varies.

    I really appreciate your help – thanks very much!


    Moderator keesiemeijer



    The default JPEG compression level is 90% when WordPress uploads an image.
    You can set it to not compress images (100%) with this in your theme’s functions.php file:

    add_filter('jpeg_quality', 'jpeg_quality_callback');
    function jpeg_quality_callback($arg) {
    return (int) 100;

    consider creating a child theme instead of editing your theme directly – if you upgrade the theme all your modifications will be lost. Or create a plugin with the code above.

    Keesiemeijer, thanks very much for your prompt reply. This is very helpful, but regarding the example picture I just posted (detailed above and named “accordsezmarc3b.jpg” – which now you can see in the first post on the blog it was downsized from 13 kB to around 7 kB which means an 50% reduction. A 10% reduction, as you indicate above, would be perfectly ok but this much is rather annoying. What could be the problem? All in all, as I say above, WP does not always reduce the uploaded images by 10%: the actual extent varies with apparently no logic at all. It could be 10%, or it could be 50%…

    Thanks for getting back to me!


    or any other random percentage (not only 10 or 50), sorry

    Moderator keesiemeijer



    Did you upload a new image with the functions.php code above?

    There’s no correlation between compression and image size. i.e 10% compression doesn’t result in 10% image size reduction. It depends on the information the image holds.

    Thanks. I will do it and let you know if it worked asap.

    Deer Keesiemeijer, we tried both ways you suggested (change theme css, create plugin) but to no avail – quite annoying considering that my wife and I must have spent at least 60-70 working hours already trying to figure this out. Could this be a general issue pertaining to all WP blogs?

    Also, any hints would be appreciated as to why WP has to compress uploaded images (in the downloadable version) when those files are stored on servers that users pay for anyway?

    Thanks very much for your kind help!


    Moderator keesiemeijer



    Could you test if it happens with all plugins de-activated, re-activate the plugins one by one until you find the problematic plugin(s).

    Just deactivated all plugins and it still happens. I also tried with your code on only as a plugin and all others deactivated. I upload a new picture and still the same…

    UPDATE: I just uploaded 2 large images (600 and 1200 megs) and interestingly both are displayed ok in the blog. Can it be that only images up tp a certain size are compressed?





    Hi, everybody, sorry to write so late… The problem is not connected to wordpress but your internet service. There is an automatic in-built image compression in wireless connections which you have to switch off.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘WP reduces size of uploaded image’ is closed to new replies.