changing Favicons in j4 Topic is solved

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
D0li
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Jan 12, 2022 12:03 am

Re: changing Favicons in j4

Post by D0li » Tue Oct 25, 2022 6:13 am

sorted, the 2 svg file in the in /media/system/images folder caused the trouble :)

Cheers :)

sillitoe
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Feb 01, 2009 12:13 pm
Location: Luxembourg
Contact:

Re: changing Favicons in j4

Post by sillitoe » Thu Oct 27, 2022 2:48 pm

I loaded a favicon to media/templates/site/cassiopeia/images (and tried a few other places too before that) and it works in Chrome and Edge, but not in Firefox. Is there a solution for that?

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13326
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: changing Favicons in j4

Post by sozzled » Thu Oct 27, 2022 4:38 pm

“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

sillitoe
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Feb 01, 2009 12:13 pm
Location: Luxembourg
Contact:

Re: changing Favicons in j4

Post by sillitoe » Thu Oct 27, 2022 6:12 pm

Thank you Sozzled. I removed the cookie and refreshed the page with "Ctrl + Shift + R", but it didn't help. I think I read somewhere that Firefox is looking for the favicon in a different place.

User avatar
ceford
Joomla! Ace
Joomla! Ace
Posts: 1572
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: changing Favicons in j4

Post by ceford » Thu Oct 27, 2022 6:25 pm

Did you look at the page source - you will see the favicon links near the top. Click on them - the two svg favicons will show as svg text. the ico icon will show as an icon.

sillitoe
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Feb 01, 2009 12:13 pm
Location: Luxembourg
Contact:

Re: changing Favicons in j4

Post by sillitoe » Fri Oct 28, 2022 7:38 am

Thank you ceford. There are 3 different ones:

/joomla4/media/system/images/joomla-favicon.svg"
/joomla4/media/templates/site/cassiopeia/images/favicon.ico
/joomla4/media/system/images/joomla-favicon-pinned.svg

However, the website is at https://alnu.lu/joomla4

Perhaps there is some problem with the relational links, though I don't understand how it will decide which favicon to display.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13326
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: changing Favicons in j4

Post by sozzled » Fri Oct 28, 2022 7:57 am

Please post a list of all the files in the folder ../media/templates/site/cassiopeia/images and the dates that these files were created (or added).
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

User avatar
ceford
Joomla! Ace
Joomla! Ace
Posts: 1572
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: changing Favicons in j4

Post by ceford » Fri Oct 28, 2022 9:59 am

sillitoe wrote:
Fri Oct 28, 2022 7:38 am
Thank you ceford. There are 3 different ones:

/joomla4/media/system/images/joomla-favicon.svg"
/joomla4/media/templates/site/cassiopeia/images/favicon.ico
/joomla4/media/system/images/joomla-favicon-pinned.svg

However, the website is at https://alnu.lu/joomla4

Perhaps there is some problem with the relational links, though I don't understand how it will decide which favicon to display.
I can see the three icon links. The favicon.ico is a link to your own icon BUT it is an 'alternate icon' meaning it is a fallback for browsers that do not use svg icons. The one being displayed is joomla-favicon.svg.

You need to create your own svg icon and put it in media/templates/site/cassiopeia/image

See https://docs.joomla.org/J4.x:Favicons for information on how to create svg favicons.

rgtr
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 181
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: changing Favicons in j4

Post by rgtr » Fri Oct 28, 2022 10:12 am

Hi

just tested on my pc.

Opera - shows an icon
Firefox = no icon
Chrome - shows an icon

Richard

sillitoe
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Feb 01, 2009 12:13 pm
Location: Luxembourg
Contact:

Re: changing Favicons in j4

Post by sillitoe » Fri Oct 28, 2022 6:55 pm

Sorry, finally got it working. In the end, I used https://anyconv.com/ico-to-svg-converter/ to convert my .ico favicon to .svg, renamed it as joomla-favicon.svg, and put it in the media/templates/site/cassiopeia/images folder, as suggested. I'm still not sure if that's the correct procedure, because I would have thought that the name "joomla-favicon.svg" would be reserved for the Joomla favicon.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13326
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: changing Favicons in j4

Post by sozzled » Fri Oct 28, 2022 7:16 pm

The question was answered earlier:
Jaydot wrote:
Tue May 31, 2022 9:44 am
Cassiopeia looks for three pre-defined file names when it needs a favicon:
- favicon.ico
- joomla-favicon.svg
- joomla-favicon-pinned.svg.
(Make an svg version of your favicon, rename it to joomla-favicon.svg, make a copy of it and rename that to joomla-favicon-pinned.svg.)

Cassiopeia will first look in the ../cassiopeia/images folder; if there are no favicon files there, it will default to the images in the system folder.

So add the three files to ../media/templates/site/cassiopeia/images.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

newUsername
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Nov 11, 2022 3:19 pm

Re: changing Favicons in j4

Post by newUsername » Fri Nov 11, 2022 3:38 pm

Has the problem with favicons been resolved? They are not removed during the update? :geek:

becyn1
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri May 13, 2016 2:50 pm

Re: changing Favicons in j4

Post by becyn1 » Sat Feb 04, 2023 9:21 pm

Good point there, I tried this for the site folder and the favicon still doesn't change, then I rename the 3 files in media/system/images into a different name from what they are initially, I guess since joomla couldn't load any of them due to incorrect name, it then used the one I uploaded under the site template as stated above and it works fine. There's one problem though, the default joomla icon for administrator does not load so I had to upload a 'joomla-favicon.svg' under media/templates/administrator/atum/images and it looks just like before.
Thanks all.
I did a similar fix, but I renamed the joomla svg and ico files in media/system/images, then uploaded my favicon.ico to that same directory. The favicon now displays on Atum and Cassopedia
However, I think an update will put me back to square one.

I haven't figured out if it's possible to write an override to the icon selection code? is it possible?
So far i have only figured out how to successfully do a CSS override to the template...

becyn1
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri May 13, 2016 2:50 pm

Re: changing Favicons in j4

Post by becyn1 » Sun Feb 05, 2023 4:27 pm

FYI to make svg files:
I found this gimp tutorial to be clear and to the point, unlike some other svg tutorials out there.
The only thing he doesn't make clear is that you have to type the svg extension at the end of the file name because the application doesn't add it automatically. Used this method on a B&W logo. It was quick and easy. i guess logos with complex color gradients might be trickier, but can also be done.

https://thegimptutorials.com/how-to-make-svg-file/

becyn1
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri May 13, 2016 2:50 pm

Re: changing Favicons in j4

Post by becyn1 » Sun Feb 05, 2023 5:14 pm

I Had a little time today and curiosity got the best of me.
I downloaded a copy of Inkscape and gave it a test drive.
The app is very intuitive ,and easy to use.
On e the left hand menu , select 'other" . There are icon template sizes ready to select with out any setup.
I loaded my jpg logo in, selected "save as" and it was now in an svg icon format. It worked fine when I tested it. Almost too easy!


Post Reply

Return to “General Questions/New to Joomla! 4.x”