Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter liquidsponge

    (@liquidsponge)

    I did some further digging on this and noticed in the HTML for the generated invoice that the thumbnail image tag snippet returned by get_the_post_thumbnail has the loading="lazy" attribute to enable WordPress 5.5’s lazy loading. Removing this tag fixes the issue.

    My quick and dirty hack for others that may be facing the same issue:

    
    $thumbnail_snippet = get_the_post_thumbnail($product->id, array( 40, 40 ));
    $thumbnail_snippet = str_replace('loading="lazy"', '', $thumbnail_snippet);
    echo($thumbnail_snippet);
    
    • This reply was modified 5 years, 8 months ago by liquidsponge. Reason: Mark as resolved
Viewing 1 replies (of 1 total)