• Resolved tigeraquarius

    (@tigeraquarius)


    Dear support team, please help to solve a very strange plugin behavior.

    I have images of different sizes, including the full size 1920 x 1280px. But Modula doesn’t use any of those images, instead it creates it’s own size of 2000x1500px for horizontals. And 2000x2500px for verticals. And those new created files weight 2-3 times more than originals.

    If I manually delete those new images from FTP and reload the page with Modula gallery, they are created again. And of course it dramatically speeds down the loading.

    My thumb size of the gallery is set to 500.

    Thank you

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

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter tigeraquarius

    (@tigeraquarius)

    I’ve figured out, that it creates it’s own images every time it can’t find a “proper size”.

    I changed the thumb size from 500 to 100, and now it creates set of 400×300 and 400×500 images in my FTP.

    BTW, why it doesn’t use the WebP images and takes JPEGs only?

    Thread Starter tigeraquarius

    (@tigeraquarius)

    And just now I’ve an official message from wordpress saying:

    Howdy!

    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

    In this case, WordPress caught an error with one of your plugins, Modula.

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.3.2
    Current theme: Pofo (version 1.1.12)
    Current plugin: Modula (version 2.2.3)
    PHP version 7.1.33

    Thread Starter tigeraquarius

    (@tigeraquarius)

    Error Details
    =============
    An error of type E_COMPILE_ERROR was caused in line 34 of the file /home/customer/www/ovsyannikova.com/public_html/wp-content/plugins/modula-best-grid-gallery/includes/class-modula.php. Error message: require_once(): Failed opening required ‘/home/customer/www/ovsyannikova.com/public_html/wp-content/plugins/modula-best-grid-gallery/includes/libraries/class-modula-template-loader.php’ (include_path=’.:/usr/local/php71/pear’)

    Hello @tigeraquarius,

    Thank you for reaching out to us!
    Webp – We are using WordPress’ core uploader and resizer and it does not yet support WebP images. We do have this on our roadmap though.

    Regarding your error, can you please check and see if you have this file: includes/libraries/class-modula-template-loader.php ? If you don’t please delete Modula and reinstall it.

    Warmly,
    Mihaela

    Thread Starter tigeraquarius

    (@tigeraquarius)

    Hello Mihaela,

    thanks for the reply. Yes, I do have that file.

    <?php
    
    if ( ! class_exists( 'Gamajo_Template_Loader' ) ) {
      require MODULA_PATH . 'includes/libraries/class-gamajo-template-loader.php';
    }
    
    /**
     *
     * Template loader for Modula.
     *
     * Only need to specify class properties here.
     *
     */
    class Modula_Template_Loader extends Gamajo_Template_Loader {
    
      /**
       * Prefix for filter names.
       *
       * @since 1.0.0
       *
       * @var string
       */
      protected $filter_prefix = 'modula';
    
      /**
       * Directory name where custom templates for this plugin should be found in the theme.
       *
       * @since 1.0.0
       *
       * @var string
       */
      protected $theme_template_directory = 'modula';
    
      /**
       * Reference to the root directory path of this plugin.
       *
       * Can either be a defined constant, or a relative reference from where the subclass lives.
       *
       * In this case, <code>MODULA_PATH</code> would be defined in the root plugin file as:
       *
       * @since 1.0.0
       *
       * @var string
       */
      protected $plugin_directory = MODULA_PATH;
    
      /**
       * Directory name where templates are found in this plugin.
       *
       * Can either be a defined constant, or a relative reference from where the subclass lives.
       *
       * @since 1.1.0
       *
       * @var string
       */
      protected $plugin_template_directory = 'includes/public/templates';
    }
    Thread Starter tigeraquarius

    (@tigeraquarius)

    The wordpress error doesn’t bother me that much, than creating of huge heavy files.

    Thread Starter tigeraquarius

    (@tigeraquarius)

    Any update please?

    Hello @tigeraquarius,

    Unfortunately if that file is there were not sure what could be causing it.
    Can you please delete Modula and reinstall it?

    Regarding the heavy files, I recommend changing the Thumbnail size to a smaller one.
    For ‘Custom Grid’ we recommend setting it to values between 100 and 150: https://modula.helpscoutdocs.com/article/210-thumbnail-size

    Warmly,
    Mihaela

    • This reply was modified 4 years, 1 month ago by Miha.
    Thread Starter tigeraquarius

    (@tigeraquarius)

    If I have it set to 150px, the images look blurry. See the pictures attached.
    And they look sharp and nice when I have it set to 500px. But in this case 3x times wider images are generated 🙁

    150px

    500px

    Thread Starter tigeraquarius

    (@tigeraquarius)

    I tested it out and figured out the following:

    For Custom grid gallery Modula creates horizontals with height 3x more than Thumbnail size. And verticals with height 4 times more than Thumbnails.

    So let’s say I have thumbnails set to 135px. And 3 row gallery with mixed horizontal and vertical shots.
    In the uploads folder Modula creates images of 540x405px size and 540x675px. And those images are heary and not optimized.

    I’ve deleted and reinstalled the plugin, it didn’t help.

    I was planning to buy the PRO version for all my galleries, but if it works like that, it’s not the best idea…

    Hello @tigeraquarius,

    The images inside a Custom Grid are based on squares so to speak. When you set up the thumbnail size you are actually setting up the side of a square. If you make an image inside the grid 4×4 squares this means that image will have a width equal to 4 x thumbnail size and a height of 4 x thumbnail size. For example if you set the thumbnail size to 100px and make an image of 4 by 4 square that image will be resized to 400×400 px.
    These images are resized using WordPress’ library and if you don’t upload an optimized image, the resized image will be the same.
    We do have a premium addon, SpeedUp, that will resize images through ShortPixel’s servers and will optimize them. If you want to use larger images you can use the lazy load option to improve speed.
    Hope this makes sense.

    Warmly,
    Mihaela

    Thread Starter tigeraquarius

    (@tigeraquarius)

    Ok, got it. Thank you very much for your time and answers

    @tigeraquarius In modula-best-grid-gallery/includes/class-modula-image.php, function resize_image, remove everything in the function and leave:

    return $url;

    This will stop the huge images and use your .webp images.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Modula creates it’s own HUGE images’ is closed to new replies.