• Resolved m.nshawaty

    (@mnshawaty)


    hello i installed your plugin and after i converted all imgs
    now how i can show it
    i added in function.php this filters :

    add_filter('webpc_uploads_root', function($path) {
      return ABSPATH;
    });
    
    add_filter('webpc_uploads_path', function($path) {
      return 'site/assets/uploads';
    });
    
    add_filter('webpc_uploads_webp', function($path) {
      return 'site/assets/uploads-webpc';
    });
    
    add_filter('webpc_uploads_prefix', function($prefix) {
      return '/';
    });

    but it dosn’t work for me and img still in old url not webp

    my upload path is like :
    website.com/cdn/site/assets/uploads

    and i installed wordpress in this directory
    website.com/cdn

    and iam using website url as main dir for home page of wordpress
    website.com/

    and another question with .htaccess do we need to edit the main .htaccess of wordpress ?

    • This topic was modified 4 years, 5 months ago by m.nshawaty.
    • This topic was modified 4 years, 5 months ago by m.nshawaty.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @mnshawaty,

    Thank you for your message.

    Please give me all the information that is mentioned in the FAQ in the question about technical support.

    Thread Starter m.nshawaty

    (@mnshawaty)

    hi thanks for you its first time posting in communities so
    finally i solve it by correct small thing new code is here :

    add_filter('webpc_uploads_root', function($path) {
      return ABSPATH;
    });
    
    add_filter('webpc_uploads_path', function($path) {
      return 'site/assets/uploads';
    });
    
    add_filter('webpc_uploads_webp', function($path) {
      return 'site/assets/uploads-webpc';
    });
    
    add_filter('webpc_uploads_prefix', function($prefix) {
      return '/cdn/';
    });

    thanks at all but i have small question for info only
    why when i open the img in new tab it will be open in old URL
    but when i save it it save it like webp

    does the plugin can convert img while upload automatically ?

    thanks.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Tell me please, did you read the plugin FAQ? There you will find answers to your questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘problem with showing webp url’ is closed to new replies.