• Resolved harrisent

    (@harrisent)


    Hi, File names of converted files are saved as filename-jpeg.webp is there a way to stop the -jpeg, so the file would be filename.webp?

    Thanks.

    • This topic was modified 1 year, 9 months ago by harrisent.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @harrisent,

    Thank you for your message.

    Why do you want to do that? The plugin doesn’t change URLs – that’s the idea of how it works.

    How does the plugin work? When a browser tries to download an image file, the server checks if it supports the AVIF format (if enabled in the plugin settings). If so, the browser will receive the equivalent of the original image in the AVIF format. If it does not support AVIF, but supports the WebP format, the browser will receive the equivalent of the original image in WebP format. In case the browser does not support either WebP or AVIF, the original image is loaded. This means full support for all browsers.

    Below I have attached the instructions:

    Best,
    Mateusz

    in some recent version this have problem with nginx server and other problem is change url for webp file because for example:

    when i have this image:
    /uploads/2023/03/LoadingLogo.png
    The plugin convert this to webp and rename like this:
    /uploads-webpc/uploads/2023/03/LoadingLogo.png.webp

    Another problem with NGinx is when activated the “Bypassing Nginx (use when you have a problem with the bypassing_apache error)” Option in Advanced Settings tab, the image url output is wrong and changed to this:
    /uploads/2023/03/LoadingLogo-optimized.png
    In this url added -optimized and in the site have not found error.
    You added this code :
    const FILENAME_SUFFIX = ‘-optimized’;
    in the “HtaccessBypassingLoader.php” file :
    \webp-converter-for-media\src\Loader\HtaccessBypassingLoader.php
    And when delete -optimized from this, plugin get error for nginx server and not serve webp file in frontend

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @masoudnkh The plugin does not change URLs with the default (recommended) image loading mode. Please set the mode “via .htaccess / Nginx” – this mode should work without any problems.

    What happens then?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘File name structure -jpeg.webp’ is closed to new replies.