Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #925373

    A quick fix that may help others.

    By default, Enfold uses the 640×640 image for all sizes in the Instagram widget. In “framework/php/class-framework-widgets.php”

                            foreach ( $images as $image ) {
    
                                    // see https://github.com/stevenschobert/instafeed.js/issues/549
                                    $image['thumbnail_src'] = preg_replace( "/^https:/i", "", $image['thumbnail_src'] );
                                    $image['thumbnail'] = $image['thumbnail_src'];                                
                                    $image['small'] = $image['thumbnail_src'];
                                    $image['large'] = $image['thumbnail_src'];

    If like me you use Thumbnails in your widget, the 640×480 image causes an F on the PageSpeed rank. To get better sized images, replace
    $image['thumbnail'] = $image['thumbnail_src'];
    with
    $image['thumbnail'] = $image['thumbnail_resources'][0]['src'];
    This gets the 150×150 image url for the thumbnail.

    Hope this helps someone.

    • This topic was modified 6 years, 8 months ago by Jason.
    #925896

    Hey Jason,

    Thanks for sharing, much appreciated :-)

    Best regards,
    Rikard

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.