• Resolved lawriem1

    (@lawriem1)


    Hi
    Thanks for the plugin.
    It seems that NextGEN Gallery images are not supported, unless I am missing something?
    The plugin is installed and images in the media library have been converted but images in the NextGEN Gallery are still showing as JPGs on the frontend.

    The page I need help with: [log in to see the link]

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

    (@mateuszgbiorczyk)

    Hi @lawriem1,

    Thank you for your message.

    The plugin supports images from the following directories:

    • /wp-content/uploads
    • /wp-content/plugins
    • /wp-content/themes

    And your files are located in the /wp-content/gallery directory, which is not supported.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @lawriem1 But I am happy to help you and show you how you can add support for /wp-content/gallery directory to the plugin.

    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.

    Did this solution help you?

    Thread Starter lawriem1

    (@lawriem1)

    Thank you for your quick reply.
    Most of my images are delivered through the NextGEN Gallery on 10 of my websites so it is a shame that the associated directory is not supported.
    I would imagine many people would be in the same boat as the NextGEN Gallery plugin is widely used (5th most popular plugin for WordPress).
    Any plans to support it?

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @lawriem1 Please read my second post above. I think it will help you.

    Thread Starter lawriem1

    (@lawriem1)

    Thanks Mateusz
    Our messages crossed.
    I will try your solution tomorrow (getting late here now) and let you know how I get on.
    Thanks again for your prompt reply.

    Thread Starter lawriem1

    (@lawriem1)

    I added the code as instructed and the new gallery directory appeared in the list. I saved the changes and deleted the cache but the NextGEN images were still served as JPGs. Also the gallery didn’t work properly. Clicking on a thumbnail just opened that image with no way of going to the next image.

    I then regenerated the images and flushed the cache again but just got the same result.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @lawriem1 Could you please send me the contents of the following files?

    • /.htaccess (root directory of WordPress)
    • /wp-content/.htaccess
    Thread Starter lawriem1

    (@lawriem1)

    I’m using the Pass Thru Image Loading mode, not via .htaccess

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @lawriem1 Why?

    Thread Starter lawriem1

    (@lawriem1)

    Because if I use the .htaccess version I get this error message.

    WebP Converter for Media
    Changes were successfully saved! Please flush cache if you use caching plugin or caching via hosting.
    Server configuration error
    Redirects on your server are not working. Check the correct configuration for you in the plugin FAQ. If your configuration is correct, it means that your server does not support redirects from the .htaccess file or requests to images are processed by your server bypassing Apache.

    In this case, please contact your server administrator.

    Also try changing option “Image loading mode” to a different one. Issues about rewrites can often be resolved by setting this option to “Pass Thru”. You can do this in plugin settings below. After changing settings, remember to flush cache if you use caching plugin or caching via hosting.

    Error codes: rewrites_not_working

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @lawriem1 Please send me a screenshot of the plugin settings.

    Thread Starter lawriem1

    (@lawriem1)

    OK. Where should I send it?

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Please send me via e-mail – mateusz[at]gbiorczyk[dot]pl.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘NextGEN Gallery Images Not Supported?’ is closed to new replies.