• Hello
    Could you please advise how to solve the following problem. I created a custom template in WordPress which contains clear html for landing page. Everything works but pictures are not opening.
    WordPress substitutes pictures for transparent background and they are not loading
    Each rendered tag contains:

    <img class="img-fluid" src="data:image/svg+xml,%3Csvg%20xmlns='https://www.w3.org/2000/svg'%20viewBox='0%200%201%201'%3E%3C/svg%3E" alt="alternative" data-lazy-src="*/wp-content/themes/tml_name/landing_bitumen/images/uvb-2.png"> 

    Though path to file is specified clearly:

    <img class="img-fluid" src="/wp-content/themes/tpl_name/landing_bitumen/images/header-banner.png" alt="alternative">

    Please help – where is the problem?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try this code in your functions.php to turn off the SVG data URLs:

    function disable_svg_data_uri() {
      remove_action('template_redirect', 'wp_inline_svg');
    }
    add_action('init', 'disable_svg_data_uri');
    
    

    Thread Starter r3v1s10n

    (@r3v1s10n)

    Its not a work…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dont work lazy load wordpress in custom template’ is closed to new replies.