Problem:
I have a website with a footer done with javascript (so it appears in every html page) and I cannot add the social media images, because the images I have in the folder “images” cannot be tracked.
When I write img src=”” Visual Studio just doesn’t track any route. How can I fix it?
I tried using flaticon and FontAwesomedirectly but I have no idea of how to do that without downloading the images, I have to register for that, right?
Solution:
Try writing “./” inside src it may suggest folder path where image is located. if not then there is no path u may not have any folder. P.S : make sure the folder is inside the main folder where u have written index.html file.
If you prefer to use online resources like Font Awesome or Flaticon for your social media icons, you don’t need to download the images. you can use Font Awesome icons, for example:
a. Include the Font Awesome CSS in the section of your HTML:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css">
b. Use Font Awesome icons in your footer:
<i class="fab fa-facebook"></i> <!-- Facebook icon -->
<i class="fab fa-twitter"></i> <!-- Twitter icon -->
<!-- and so on... -->
For Font Awesome, you don’t need to download the icons individually. You reference them by their class names.