• Resolved kator

    (@kator)


    Hi, I was really enjoying this plugin, but the page load for my first gallery is quite a bummer. I did some searching through the FAQ’s and found the suggestion to enable cropping, but after doing so and setting the cropped size to 100×100 (just to test) I saw no difference in the gallery appearance or page load time.

    Even the plugin area on the “Edit Post” page slows down the page load (not sure if this is related or not) but as I’m scrolling down the reach the gallery to edit it the page scroll slows to a crawl.

    I’m using 1.3.5.8 of the plugin, 4.2.2 of WP, here’s my gallery: http://www.katyhikes.com/2015/09/17/solo-cardigan/

    Any suggestions are welcome.

    https://wordpress.org/plugins/envira-gallery-lite/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello Katy,

    Thank you for contacting us 🙂

    I ran your url through the GTMetrix pagespeed tool which provided the following result: https://gtmetrix.com/reports/www.katyhikes.com/SYvyiva3

    There are a number of issues which could be implemented to improve the performance, this in turn will allow Envira to perform better as well.

    1. I noticed that photos in your gallery are very large in size which is slowing down loading of pages on your site (for example: IMG_0087 is of 18mb), you can compress or optimize photos on your computer before uploading to WP or using any of the following WP plugins:
    https://wordpress.org/plugins/ewww-image-optimizer/
    https://wordpress.org/plugins/tiny-compress-images/

    The recommendation to serve scaled images is a large factor in the page performance. You may wish to inspect the images when they are displayed on the largest browser you support and change the Image Dimensions under the Config tab to match those dimensions.

    If needed, Other advanced WordPress Speed Optimization methods are:

    2. Following this, you can enable the height and width parameters on the image tags under the Config tab when editing your gallery, which resolves the “Specify image dimensions” recommendation for gallery images. You’ll want to add image dimensions to all other images used on the site as well – specifying a width and height for all images allows for faster rendering by eliminating the need for unnecessary reflows and repaints.

    Use any of the plugins above to losslessly compress images.

    3. To address the Expires Headers, Browser Caching and GZIP Compression recommendations, open the .htaccess file in the root directory of your WordPress installation and add the following:

    ## BEGIN Disable ETags ##
    Header unset ETag
    FileETag None
    ## END Disable ETags
    
    ## BEGIN GZIP Compression ##
    <ifModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
    </ifModule>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    ## END GZIP Compression ##
    
    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 7 days"
    </IfModule>
    ## EXPIRES CACHING ##

    You can try setting all JavaScript to defer by adding the following to your theme’s functions.php file

    //* Defer parsing of JavaScripts
    function defer_parsing_of_js ( $url ) {
    	if ( FALSE === strpos( $url, '.js' ) ) return $url;
    	if ( strpos( $url, 'jquery.js' ) ) return $url;
    	return "$url' defer ";
    }
    add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );

    Please note that defering all JavaScript may interfere with some plugins, and you’ll want to test thoroughly your site’s front-end appearance after including. If it breaks a plugin just remove from your functions.php file.

    You can remove query strings from JS and CSS files by adding the following to your theme’s functions.php file: https://gist.github.com/ericakfranz/a7f172fd63aaf01ede4c

    Minifying the CSS for the site is recommended. Plugins like BWP Minify or Autoptimize are an easy way to implement this. If you choose to enable JavaScript minify, be sure to thoroughly check the functionality of your site as this can break JavaScript dependent plugins. If this breaks a plugin you can simply disable the JavaScript minification.

    Once you’ve made these changes you can re-test the url at GTMetrix to check the improvement. Thank you

    Thread Starter kator

    (@kator)

    Thank you! I will try these. In the meantime I wrote a grumpy review of the plugin since I missed notification of your reply (sorry!) I will delete my review for now and try your suggestions when I get a chance.

    Thread Starter kator

    (@kator)

    Here’s another problem I’ve noticed, I’ve installed the EWWW plugin to optimize all mi photos, but the plugin is still slow on the back end. When I’m creating and editing a plugin in the plugin tool (instead of from the post) and I go to “publish” or “update” the gallery after making changes, the page that loads next is http://www.katyhikes.com/wp-admin/post.php#!envira-tab-config and is completely blank, I have to hit “back” to get back to my dashboard. This is after I’ve “bulk optimized” all the photos already in my media library.

    I suspect that the size of the photos is the major problem, (I thought WP was doing that automatically, lesson learned), but I’m surprised to see that the post the gallery shortcode is added to is still breaking, and not showing anything other than the header image. I’m not sure which of your other suggestions is meant to help with this. Thank you.

    Thread Starter kator

    (@kator)

    Same goes now for adding a gallery from inside the post. “Updating” the page leads to the same blank page and gallery is not showing up on live view of post.

    Will you check for a possible theme/plugin conflict causing the white screen on save?

    Thanks!

    Please open a support request at http://enviragallery.com/contact/ > Complete a Form, including:

    1. Export of your Gallery Config
    2. WordPress login details (please create a user for the purpose of support)

    Don’t post credentials here.

    We can then investigate your specific installation and advise to a solution.

    I found a reason that made my load so slow. WooCommerce. In the WooCommerce tab there’s two options:

    Enable WooCommerce? Enables WooCommerce Add to Cart functionality for each image in the gallery grid, if the image is assigned to a WooCommerce Product.

    Lightbox Options.
    Need some help? Read the Documentation or Watch a Video

    Enable WooCommerce? Enables WooCommerce Add to Cart functionality for each image in the Lightbox view, if the image is assigned to a WooCommerce Product.

    I found when I had the Lightbox WooCommerce checked, it caused the script to stop running while it was trying to load it for every photo. If you disable it by unchecking the box, it should solve the problem. For now run the WooCommerce on the main page on the grid.

    I also let LR only upload at 60 quality since I dont want full photos online. Last, I use medium 300×300 for thumbnails and medium large 768×0 for lightbox and seems to run smooth now.

    In my case I have multiple versions of the same image being uploaded but yet Envira Gallery is taking the largest image for the thumbnail view and doing css based scaling. You can use the best compressing tools and caching mechanisms available on wordpress, but if you always pick a 6.4MB file as opposed to a 150KB file you will always have such performance problem.

    DSC-1234-1024×650.jpg – 143KB
    DSC-1234-1024×681.jpg – 149.6KB
    DSC-1234-150×150.jpg – 8KB
    DSC-1234-300×199.jpg – 18.6KB
    DSC-1234-768×511.jpg – 18.6KB
    DSC-1234.jpg – 6.4MB

    Is there something that we can configure to tell Envira to use an already scaled down version of the image?

    best regards,
    Mark

    I changed the image size to ‘Medium (300 x 300)’ from the gallery config section and it looks like the correct image size is being used. However it looks like that as part of the same page load, envira is loading the full size images as well. This is resulting in a page load of 28s !!! which is due to the fact that a single page load is transferring 108MB !!

    Resizing images for me is not an option since I need to sell the full quality images online. What I need Envira to do is to just load the thumbnail images only until the gallery view is properly loaded. This sounds like a pretty basic handling, so I am suspecting that I am missing something here.

    Mark

    • This reply was modified 7 years, 4 months ago by mbrk.

    We have exactly the same issue where full size images are being served rather than the standard WordPress thumbnails. Not sure if we’ve missed a setting somewhere?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Gallery Slow to load’ is closed to new replies.