• It seems Photon is increasing the file size of JPEG images with high compression. If I save a JPEG image with high compression and upload it to Media Library, the version on my host keeps the original size, while the version at ix.wp.com becomes larger/heavier. Apparently, that does not happen when I upload JPEG images with low compression.

    I think Photon may be reprocessing the image files using a lower compression rate (i.e., higher nominal quality), therefore increasing its size. For example, a JPEG image with quality 10 (high compression) is reprocessed by Photon with quality 90 (low compression). If true, that is not good – we end up getting worse image quality and higher file size.

    Two questions:

    1. What is happening?
    2. Is it possible to disable the Photon “reprocessing” of the original images? I love the hosting feature, and it would be great to use that with the actual original images, without reprocessing them. (I would not mind having this “reprocessing” enabled for automatically generated thumbnails, of course.)

    Here are two examples.

    Image #1 (quality 30 with XnView)
    Original (71.16 KB): https://goo.gl/8ah2E8
    Photon (72.24 KB): https://goo.gl/ObNkdb

    Image #2 (quality 10 with Photoshop)
    Original (230.38 KB): https://goo.gl/Tj9cKQ
    Photon (282.38 KB): https://goo.gl/tI5Xaq

    With Photon, Image #1 is a little bit heavier, and its quality is severely worse, with more artifacts and wrong colours. Image #2 is a lot heavier, and its quality is only a bit worse.

    I have tried adding this to my functions.php file, but nothing has changed (i.e., the problem persists):

    add_filter('jetpack_photon_pre_args', 'jetpackme_custom_photon_compression' );
    function jetpackme_custom_photon_compression( $args ) {
        $args['quality'] = 100;
        return $args;
    }

    Thanks in advance.

    https://www.ads-software.com/plugins/jetpack/

Viewing 7 replies - 16 through 22 (of 22 total)
  • The Photon cache needed to be cleared for your images. If you open the images now you will see they have no colour changes.

    https://goo.gl/hGkWwZ
    https://goo.gl/sgrLui

    Thread Starter Argumentum

    (@argumentum0)

    I agree they’re looking great and any visual change is barely noticeable (if noticeable at all), but that is valid only for high-quality source images. Images with high compression still suffers, but I kind of gave up using them, because, from what I understand, that’s not going to change soon.

    In any case, those sentences I quoted are still incorrect. I just think the Photon documentation needs to be (or look) more accurate than it is now.

    I think maybe you are misinterpreting the sentence in the docs. It states that the “original unaltered image quality” will be used and not the original unaltered image. If you run an image inspection program, like ImageMagick’s identify utility on Linux, you will see the source and Photon images have exactly the same quality setting. It has been unaltered by Photon, although it has been passed through GraphicsMagick to ensure the image is valid (as mentioned before this isn’t going to change due to abuse prevention measures).

    We also use the lossless compression utility jpegoptim https://www.freecode.com/projects/jpegoptim/ to convert the JPEG to progressive and provide the smallest possible losslessly compressed image.

    These features have been added in order to ensure that site users get the safest, best looking and fastest possible user experience.

    Thread Starter Argumentum

    (@argumentum0)

    If that’s the case, then yes, I misinterpreted the first sentence, but I still think the documentation should be more clear to avoid such mistakes. I’d suggest: “For JPEGs a setting of 100 will output the image at the original unaltered image quality setting, but the image will be processed using a lossy compression”.

    About the second sentence, at least from my point of view, using a lossless optimisation utility doesn’t necessarily mean we will get lossless processing. From our discussion here, it seems clear that it’s impossible to get JPEG lossless processing with Photon, so the second sentence should state it is available only for PNG files.

    Is there any proper way to suggest those changes in the documentation?

    Thanks.

    Agreed on making the docs clearer and less ambiguous. I have altered the description to be clearer on the quality setting vs image quality.

    Thread Starter Argumentum

    (@argumentum0)

    Hi,

    Sorry to bump this thread, but apparently the WEBP implementation is broken again. See the examples below in Chrome or Opera:

    Example 1
    Original: https://goo.gl/QeolJQ
    Photon: https://goo.gl/Lz9077

    Example 2
    Original: https://goo.gl/jMWjcu
    Photon: https://goo.gl/A9Waal

    No problems in Firefox or IE.

    Thanks again.

    The washed out look in the grayscale image https://goo.gl/Lz9077 have been fixed.

    With regards to the https://goo.gl/A9Waal WebP image; the conversion process is using the original image quality of 70 and some parts of the image seem to have better image quality as WebP and some better in the JPEG, but this is obviously subjective. If you would like the WebP image to be of higher quality, then you will need to upload a higher quality JPEG.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Photon increasing file size of JPEG images with high compression’ is closed to new replies.