Support » Plugin: WebP Converter for Media » Can’t get the plugin to work with my custom path

  • Resolved theodlr

    (@theodlr)


    Hello,

    I tried the 3.0 and 3.0.1 versions of the plugin with this custom hooks

    add_filter(‘webpc_uploads_root’, function ($path) {
    return ‘(…)/www/’;
    });

    add_filter(‘webpc_dir_path’, function ($path, $directory) {
    switch ($directory) {
    case ‘uploads’:
    return ‘/fichiers’;
    case ‘webp’:
    return ‘/fichiers/uploads-webpc’;
    }
    return $path;
    }, 10, 2);

    and I can’t get it to work.
    My custom upload folder is called “fichiers” and is at the root of my wordpress installation.
    My server configuration seems to be good but I end up with this error

    The path for /uploads files does not exist (function is_dir() returns false). Use filter webpc_dir_path to set the correct path. The current using path is: /fichiers. Please read the plugin FAQ to learn more.
    
    ---
    
    The path for saving converted WebP files does not exist and cannot be created (function is_writable() returns false). Use filter webpc_dir_path to set the correct path. The current using path is: /fichiers/uploads-webpc. Please read the plugin FAQ to learn more.

    I read in the FAQ that :
    “the /uploads-webpc directory must be at the same nesting level as the /uploads, /plugins and /themes directories.”
    Does this mean that the plugin cannot be used with a custom upload folder at the root of the wordpress installation?

Viewing 1 replies (of 1 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hello @theodlr,

    Thanks for your message.

    If you modify the operation of a plugin, use only the filters found in the plugin FAQ. This means that they are public filters that I share with people and that are documented. You are using a different filter and unfortunately you are using it the wrong way.

    Best,
    Mateusz

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