• Hi, I have a question. I have a site inherited from a developer who didn’t follow the rules of creating themes and I have quite unusual location of photos for the theme. The photos are on the same level as basic wordpress files, i.e. wp-config.php. I’ve noticed, that the plugin doesn’t change the photos to .webp format from directories outside the default locations. How can I change it ?

Viewing 1 replies (of 1 total)
  • You could maybe modify Paths.php and WebPOnDemand.php in lib\classes\ subdir to insert your paths.
    For Paths.php it would be inside getAbsDirId, getImageRootIds and getUrlById. And of course, you’ll need to add two functions getters functions for AbsDir and Url. Read code as an example.
    For WebPOnDemand.php, it should be in getSourceNoDocRoot that you’ll have to had your “id” in $dirIdOfHtaccess.
    You should be good to go.
    Just mind (and backup before) any existing .htaccess on your external directory!

    Hope it helps.

Viewing 1 replies (of 1 total)
  • The topic ‘How to create rules for folders with photos from outside the default locations ?’ is closed to new replies.