Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Stop WP compressing images to 90% on upload to Media Library

Discussion in 'Misc WordPress Requests' started by Samuel Wood (Otto), Oct 19, 2017.

  1. Samuel Wood (Otto)

    Guest

    Reply To: Stop WP compressing images to 90% on upload to Media Library, by Samuel Wood (Otto)

    Fun fact: A “MB” is not always an “MB”.

    WordPress uses the old binary definition for megabytes, which is 1024*1024 or 1,048,576 bytes (now that’s technically called mebibytes or “MiB”).

    Your filesystem (OS X, I’m guessing?), defines an MB as 1,000,000 bytes exactly. Notice the difference?

    If you divide 7.6 million by the WordPress definition of MB (1048576), you get 7.24. That’s what you’re seeing. It’s not compression, those are exactly the same size… just using two different definitions of the same term.

    The reason for the difference originally had to do with hard drive manufacturers wanting to advertise more storage on their devices. So they used the 1 million bytes = 1 megabyte definition. Everybody in the computing world works with multiples of 2 though, so they always used the 1024 for kilobyte, and 1024*1024 for megabyte.

    Eventually, the standards settled, but from time to time, you still see this sort of difference crop up.

    There is a core ticket about this, but no real traction on changing it since it doesn’t come up very often:
    https://core.trac.wordpress.org/ticket/31350

    Reply To: Stop WP compressing images to 90% on upload to Media Library
     
    #1

Share This Page

Web Hosting