Excluding image folder inside specific page
-
Hello,
It seems from the settings I can exclude a whole page or a whole folder, but not a folder within a page.
I’ve tried the following:
function option_ewww_image_optimizer_exclude_paths_func($exclude_paths){ if(is_page(50)) $exclude_paths.= '/wp-content/uploads/ultimatemember/'; return $exclude_paths; } add_filter( 'option_ewww_image_optimizer_webp_rewrite_exclude', 'option_ewww_image_optimizer_exclude_paths_func' , 9999 ,1);
However, the current page isn’t set when the function is called so it doesn’t work.
Is there any workaround to this?
Thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Excluding image folder inside specific page’ is closed to new replies.