I am using WordPress with Neve theme, for my site, Favicon is working on posts/pages, but Favicons aren't visible for JPG/PNG/Videos.

If I use the Theme Customizer and select the Favicon PNG image, it shows on all posts and images etc.

But I want to have different Favicon Images on different URLs.

I saw that Theme was adding the below code on my site in Head.

<link rel="apple-touch-icon" sizes="72x72" href="https://milyin.com/wp-content/uploads/Icons/Icon72x72.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://milyin.com/wp-content/uploads/Icons/Icon32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="https://milyin.com/wp-content/uploads/Icons/Icon16x16.png">

this code was inserted wp_head to make it work.

It works perfectly on my posts and pages. For example the post How Does Elon Musk Manage all his Companies Effectively? the favicon is visible perfectly.

But if I Image from the save post The Image shows favicon as WordPress logo instead of my site logo.

How to make it WordPress logo programatically.

1 Answer 1


When opening media files only the file is loaded and not the html head of your file.

You can add a 'favicon.ico' file ('.png' may also work – not sure) to your root directory ('public_html/', 'www/' 'domain.com/' depending on server setup) and it should load even for media files as browsers are automaticly looking for an icon there.

  • Well, I know that html head is empty for Media files.... However how am I supposed to add the ion... What should be the name of file and where to place it? Sep 6, 2021 at 3:09
  • 1
    The name should be 'favicon' and it should be in the 'root directory'. You can add it using ftp... Sep 6, 2021 at 9:16
  • Confirmed that you'll need to upload "favicon.ico" to the web root, and that worked for me
    – Hector
    Oct 12, 2023 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.