• Resolved 2candela2

    (@2candela2)


    Hello and thanks for the plugin

    I am testing it. I have NextGEN Gallery plugin that creates a folder with images in wp-content, not in wp-content/uploads.
    May I add that folder? I have accés to ssh and i could make a direct access, but I don’t know if then those images will be served.

    Thanks

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

    (@mateuszgbiorczyk)

    Hello @2candela2,

    Thanks for your message.

    I have prepared a filter for you that will make it possible. Please add the following code to the functions.php file in your theme directory:

    add_filter( 'webpc_get_options', function( $options ) {
      foreach ( $options as $index => $option ) {
        if ( $option['name'] !== 'dirs' ) {
          continue;
        }
        $options[ $index ]['values']['gallery'] = '/gallery';
      }
      return $options;
    }, 20, 1 );
    
    add_filter( 'webpc_dir_name', function( $value, $directory ) {
      if ( $directory !== 'gallery' ) {
        return $value;
      }
      return 'wp-content/gallery';
    }, 20, 2 );

    Then a new directory will appear in the plugin in the “List of supported directories” section. Check this option and start converting all images.

    Images added to the Media Library are automatically converted to WebP. This is not possible with your directory. Check the “Enable cron to automatically convert images from outside Media Library” option in the plugin settings. This will allow them to be converted automatically on a regular basis.

    Best,
    Mateusz

    Thread Starter 2candela2

    (@2candela2)

    Thanks very much @mateuszgbiorczyk

    Today I go in holidays, but next week I will test it.
    Have a good day! ??

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @2candela2 Were you able to test this solution?

    Thread Starter 2candela2

    (@2candela2)

    @mateuszgbiorczyk sorry to answer so late ??
    My client decided to remove the gallery, so at the end, I didn’t need it….
    Thanks a lot for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘NextGEN Gallery: folder not in uploads’ is closed to new replies.