• Resolved jamieburchell

    (@jamieburchell)


    I recently tested the plugin on an image library, producing both WebP and AVIF files and noticed that almost all of the converted files were AVIF only. On closer inspection, the plugin thought that all of the generated WebP files at the default compression quality were larger than the original images. I don’t think this is correct at all? Does it mean larger than the AVIF version?

    The reason I query this is the other plugin that I was previously using to convert to WebP at 85 compression quality was able to reduce the size by at least 50% in most cases.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support nicholas2019

    (@nicholas2019)

    Hello @jamieburchell ,

    CompressX is a local image conversion tool that efficiently compresses images into WebP and AVIF formats. Compression quality varies based on the original image, processing libraries, and the adjustable compression level.

    Processing an image that was previously compressed with a higher compression level and then recompressing it with a lower compression level may result in the issue you described.

    Kind regards.

    Thread Starter jamieburchell

    (@jamieburchell)

    I have a reference JPG which is 59495 bytes. Converter for Media creates a WebP of 47098 bytes whereas ConvertX says that its WebP was larger than the original. Both plugins are at the default compression level, using the same ImageMagick library.

    In fact, ConvertX creates hardly any WebP images in my tests.

    Plugin Support tonyrobins

    (@tonyrobins)

    Hello @jamieburchell

    Thanks for your update.

    Would you send us the JPG so we could test and suggest further?

    All the best,

    Thread Starter jamieburchell

    (@jamieburchell)

    Sure! Here’s a sample.

    https://www.dropbox.com/scl/fi/lhwkr6d88u97vlwzd2xnv/sample.jpg?rlkey=bxs8ntpzwj8nvzat8uqfim9xr&st=8l9xh9yq&dl=1

    Looking at the first website I tried CompressX on, there are a lot more WebP files generated, but the second website, for some reason mainly only produced AVIF files and threw out the WebP as being larger than the original in most cases.

    Plugin Support tonyrobins

    (@tonyrobins)

    Hi @jamieburchell

    Thanks. We are going to do some further tests and keep you posted on any updates.

    All the best,

    Plugin Support tonyrobins

    (@tonyrobins)

    Hello @jamieburchell

    We tested the sample image on our site. Here is the system information of the site:

    Imagick version 1809, ImageMagick 7.1.1-29 Q16-HDRI x64 0deac72:20240225

    We uploaded the sample image:

    sample.jpg 59KB
    sample-150×150.jpg 6KB
    sample-300×200.jpg 10KB
    sample-768×512.jpg 41KB

    Processed it with Imagick library and the default compression level which is WebP 80, AVIF 60.

    Here is the result:

    sample.jpg.avif 29KB
    sample.jpg.webp 39KB
    sample-150×150.jpg.avif 4KB
    sample-150×150.jpg.webp 4KB
    sample-300×200.jpg.avif 5KB
    sample-300×200.jpg.webp 6KB
    sample-768×512.jpg.avif 19KB
    sample-768×512.jpg.webp 25KB

    Then we tested the sample image with the Converter for Media plugin with the optimal quality=85.

    Here is the result:

    sample.jpg.webp 46KB
    sample-150×150.jpg.webp 5KB
    sample-300×200.jpg.webp 8KB
    sample-768×512.jpg.webp 30KB

    We tested it for multiple times with same settings to ensure accuracy, and got the same result.

    So, according to our test results, CompressX can correctly convert the image to WebP and AVIF with expected sizes. And the conversion results of the two plugins are the same under the same quality parameters.

    In this case, we would be happy to dig deeper into the issue if you could send us a debug zip through the plugin’s Debug tab. Please also include a link to the thread when you do that to help us track the issue.

    Thanks,

    All the best,

    Thread Starter jamieburchell

    (@jamieburchell)

    That is indeed strange as the compressx-nextgen directory contained only avif versions of that image in the end. The log file just said that the original was smaller.

    I’m using php-pecl-imagick 6 with PHP 8.2

    I will try the plugin again and see if I can figure out what is going on.

    Plugin Support tonyrobins

    (@tonyrobins)

    @jamieburchell

    Sure. You can also disable the option ‘Automatic removal of files in output formats larger than the original ones’ in the plugin settings to retain converted images.

    Let us know if you need any further information or assistance.

    All the best,

    Thread Starter jamieburchell

    (@jamieburchell)

    I just ran the test again:

    CompressX

    • Imagick, default compression level
    • sample.jpg (58.1 KB)
    • sample.jpg.avif (44.2 KB)
    • (no sample.jpg.webp was produced)

    [2024-10-25 22:27:00][notice]Converting sample.jpg to WebP succeeded.
    [2024-10-25 22:27:00][notice]WebP size larger than original size, deleting file sample.jpg.webp.

    After disabling the facility to delete larger images, I see the WebP came in at 108 KB.

    Converter for Media (free)

    • Imagick, default compression level
    • sample.jpg (58.1 KB)
    • sample.jpg.webp (46 KB)
    • (no sample.jpg.avif due to it being the free version of plugin)
    $ sudo dnf list installed | grep agic
    ImageMagick-djvu.x86_64 1:6.9.13.17-1.el9.remi @remi
    ImageMagick-heic.x86_64 1:6.9.13.17-1.el9.remi @remi
    ImageMagick-libs.x86_64 1:6.9.13.17-1.el9.remi @remi
    php-pecl-imagick-im6.x86_64 3.7.0-7.el9.remi.8.2 @remi-modular
    Plugin Support nicholas2019

    (@nicholas2019)

    Thank you for your update @jamieburchell .

    Would you kindly send the debug information (logs) to our support email through System Information page please? We will analyze them thoroughly to identify the issue. Thank you in advance for your cooperation.

    To ensure efficient tracking of your thread, we kindly ask you to include the link to the thread in your email.

    Plugin Support nicholas2019

    (@nicholas2019)

    Hello @jamieburchell , after further investigation, we’ve determined that the issue is caused by a bug. To resolve this, please click the thumbs-up icon again to ensure that the default compression level is applied. Once done, run another test to verify if the issue has been resolved. Please inform us of the test results. Thank you.

    Plugin Support nicholas2019

    (@nicholas2019)

    Hello @jamieburchell ,

    We’ve released a new version (0.9.18) that includes a fix for the bug you reported. To resolve the issue, please update CompressX to the latest version. Once the update is complete, run another test to verify if the bug has been fixed. Please let us know if the issue persists after updating.

    Kind regards.

    Thread Starter jamieburchell

    (@jamieburchell)

    That’s fixed it:

    • sample.jpg.webp 38.4 KB
    • sample.jpg.avif 24.8 KB

    Thanks

    Plugin Support tonyrobins

    (@tonyrobins)

    Hi @jamieburchell

    You are welcome.

    Many thanks for reporting and helping fix the bug!

    All the best,

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.