• Resolved splaquet

    (@splaquet)


    I haven’t tried this outside of Elementor/Pro, but I’ve had it happen a few times.

    • activate webp conversion
    • check off “Generate JPEG files in addition to WebP” on Media page
    • regenerate media (i use $ wp media regenerate –yes –skip-delete)
    • refresh pages with existing WebP images
    • images now display w/ JPG file, instead of WebP
    • unchecking “Generate JPEG files in addition to WebP” on Media page & regenerating media will revert the change

    I probably wouldn’t have even noticed this, but it happened on transparent WebPs… making it really easy to see that something was off.

    This plugin was the last place that I looked… so, it was quite a surprise to find.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Thanks for reaching out @splaquet, and sharing details of what you’ve been encountering.

    Were you using WebP images before enabling the Performance Lab plugin, and if so, can you confirm this only occurs for only images uploaded after enabling the Performance Lab plugin, and not pre existing images?

    If so, this may be expected behavior given the plugin switches to WebP by default, I’ll need to check this further with the regenerate command in use.

    Thread Starter splaquet

    (@splaquet)

    I’m building out a brand new website. Fortunately, I’m able to say that 95% of the media library are existing WebP files that I’ve generated & uploaded.

    I actually ran into this problem on an earlier build, but I kind of dismissed it. It was mostly jpg files, so it wasn’t so obvious.

    With this build, I ran into an issue where the logo image, linked in through Woo > settings > email, wasn’t properly serving the WebP to end users’ end clients. (It worked, but showed broken on non-webmail clients.) I figured I’d use the plugin to generate jpg, backup versions.

    This only happened to preexisting images.

    I cannot confirm this occurs for images uploaded after enabling the Performance Lab plugin, as I have not uploaded images after the plugin was installed. I only activated the jpg conversion and ran the media regenerate CLI command.

    Worth noting, this plugin has been installed since the very beginning of this build. It’s only this jpg feature that’s wonky for me.

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for the update @splaquet. It may take me some time to test this but I will perform some checks before reporting back to you here.

    Thread Starter splaquet

    (@splaquet)

    No worries. Thanks mate!

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for your patience on this. I’ve been testing this on a site, although without Elementor Pro. When using the regenerate images WP CLI command (wp media regenerate –yes) I’m encountering the following (recording of my experience):

    1. Existing WebP Images that do have a JPEG version available (ie. The “Generate JPEG files in addition to WebP” setting you highlighted was enabled) will revert to using the JPEG version of the previous WebP image.
    2. Existing WebP images that do not have a JPEG version generated will remain in place, displaying the WebP version.

    Based on the above, what you’re facing may be expected. I also did some digging on the WP CLI command and WebP images are not supported for regeneration, see below. This may be the reason why in my case above, only the WebP images that have JPEG versions are visible as JPEGs after running the command.
    https://github.com/wp-cli/media-command/issues/149

    unchecking “Generate JPEG files in addition to WebP” on Media page & regenerating media will revert the change

    I also checked this and in my case images don’t revert to WebP after running the command. This may be where you Elementor or other plugin/feature may be impacting images served. If you’d like to share a recording of your experience we can check this further. From the recording you may wish to share the images served reverting to WebP once the “Generate JPEG files in addition to WebP” option is disabled and the command ran once more.

    Let me know if you have any questions with the above, and thanks again for your patience while testing this.

    Thread Starter splaquet

    (@splaquet)

    My apologies for any confusion. What I meant by my last part was was that…

    • Disabling also create JPG reverts the warped JPG image, and puts the webp file back… as expected. No problems there!

    That’s a shame about the webp generation via CLI. So, if I understand this correctly, the user can ONLY generate webp images by uploading them through the GUI dashboard interface?

    Any plans on implementing WP CLI conversion? ??

    Plugin Support James Osborne

    (@jamesosborne)

    No problem at all.

    That’s a shame about the webp generation via CLI. So, if I understand this correctly, the user can ONLY generate webp images by uploading them through the GUI dashboard interface?

    This seems to be the case. You can use WP CLI to upload WebP images. I’ve just tested this, it’s only the regeneration that doesn’t seem possible at present. You may wish to chime in on that open GitHub issue, or subscribe for updates.

    Note also that within the Performance Lab plugin we are working on the ability to process all images, including legacy JPEG images. See this GitHub issue for details. This may suit your needs should the WP CLI command not support WebP images at present.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘When “Also Generate JPEG” is checked off in media, existing WebP’s serve JPGs’ is closed to new replies.