• Hey – the images created by Envira are killing my site on Google page speed insights.

    The thumbnails created are 2-3 times the size of the images I am uploading. I am using Kraken.io image compressor but this isn’t having an effect on the Envira thumbnails and EWWW is no use as ‘exec function’ is disabled on the server.

    Settings are: Image size – set to default with 640×480 desktop and 320×240 mobile.

    I am working on X theme from Themeco which has Envira included… does that mean I get forum support?

    Any tips on compressing these images… never come across this previously

    I mentioned it previously here: https://ww.wp.xz.cn/support/topic/envira-produces-bigger-thumbnails-then-original-files/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @tye 🙂

    Hmm, do you happen to have a link to the page in question?

    ## 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 or you can use a free plugin for this now: https://ww.wp.xz.cn/plugins/remove-query-strings-from-static-resources/

    Minifying the CSS (and the HTML) 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.

    Thread Starter tye

    (@tye)

    Hi – I have all the GZip and minification already… its definitely the image sizes… I’ve got them down though by changing Settings are:

    Image size – set to default with 300×300 desktop and removing mobile altogether.

    Is there an option to remove Retina images… these are the ones killing it 🙁

    Hi @tye 🙂

    Unfortunately no, there is no option to disable the retina images, but I’ll certainly bring this up to the developer to see if there is anything we could possibly due in a future update.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Page Speed low – gallery images’ is closed to new replies.