I'm trying to load an image using bloginfo('template_directory')
My code:
<img class="img-fluid" style="max-height: 500px" src="<?php bloginfo('template_directory'); ?>/assets/home-image.png" />
The assets folder is inside my theme folder.
It works perfectly in my localhost.
But when I upload the code to my server I doesn't show the image.
When I inspect the element, here what it shows:
<img class="img-fluid" style="max-height: 500px" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" data-lazy-src="https://www.mywebsite.com/wp-content/themes/mytheme/assets/home-image.png">
Any guess?