WP Smush Pro - wrong percentage calculation

So,

http://screenshots.lucasrolff.com/2015_04_13_5py1ive5hzaipcr.png

According to the image, the size was reduced by 19% - but since when is 290.38 KB only 19% reduction of the original 757.38 KB?

Or am I really bad at calculations? :smiley:

  • Ash

    Hello @Lucas Rolff

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    You are not bad at calculation at all :slight_smile: You just missed a part :smiley:

    The reduced percentage is based on total size. For example, if you have 5 size for a single image, then the reduced percentage data is based on all 5 sizes.

    For example, your main image is 100KB, thumb is 20KB, and 3 other sizes are 30KB, 40KB, 50KB. The smush pro server sends you smushed images for all 5 sizes. So, reduced size image is calculated based on all of that 5 sizes.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Vinod Dalvi

    Hi @Lucas Rolff,

    Thank you for your reply.

    Actually the file size is displayed differently on the PC file system and in the WordPress media library as shown in the attached screenshots.

    So could you please calculate it based on the file size on the PC rather than after uploading it in the media library.

    If still there is the difference then would you mind if I logged in to your site and calculate it? This might help get to the bottom of this faster. If this is ok, just grant me temporary admin access to your site by clicking "Grant Access" button in the WPMU DEV Dashboard Settings as described on the following page and reply on this thread after granting it?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Regards,
    Vinod Dalvi

  • Lucas Rolff

    Your ubuntu machine, takes the amount of bytes divided by 100 (Therefore 126.1 kB), WordPress calculates the size dividing the amount of actual bytes (126075 / 1024 ) which is 123.12 KB.
    So we get a offset of 3KB comparing your Ubuntu Machine and what WordPress has.
    What I actually look at is the amount of actual bytes divided by 1024, meaning the size I see in WordPress is the size in bytes on the linux filesystem divided by 1014.

    So therefore I'm saying that this size is based on the primary image, and not primary image + scaled/resized images - therefore I also find it wrong that WP Smush Pro calculates it size using primary + scaled/resized when WP clearly lists the size of the primary image only.

    No need to grant access for this.

  • Ash

    Hello @Lucas Rolff

    I hope you are well today.

    But as far as I know, the size listed in the top is the size of the main image right?

    Yes, you are right.

    WordPress shows that file size, so the plugin is not touching that. But the at the bottom, the reduce size represents based on total filesize of all sizes of that image. It might be confusing, so I will let the developer know if we can change the wording in there :slight_smile:

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.