Announcement

#1 2021-03-20 04:29:34

piwent
Member
2020-10-24
92

Favicon not showing

Hello,

After upgrading to version 11 (now at 11.4.0) my favicon no longer shows. I have tried putting it in multiple places with no luck. I only have one theme installed, modus. It is active and is the default.

Here is where I have placed it:

/themes/default
/themes/default/icon
/themes/modus
/themes/modus/icon

None of them work.

Any ideas?

Offline

 

#2 2021-03-20 09:36:55

homdax
Member
Skåne, Sweden
2015-02-02
225

Offline

 

#3 2021-03-20 09:46:27

homdax
Member
Skåne, Sweden
2015-02-02
225

Re: Favicon not showing

I just realized it is fo ICO files only, but there are converters. And max 5KB.

Made it work though https://gallery.conram.com/

You can use https://icoconvert.com/ and select 32x32 will give you an icon at approximately the right size.

I am still a bit flabbergasted over the fact that PS wont handle ICO files.

Last edited by homdax (2021-03-20 09:53:05)

Offline

 

#4 2021-03-20 10:25:11

piwent
Member
2020-10-24
92

Re: Favicon not showing

homdax wrote:

Interesting.

Have you tried using Perso Favicon? https://piwigo.org/ext/extension_view.php?eid=462

Out of desperation I did try. But it required the favicon to be less than 5kb and mine was six. I was a touch indignant that I would have to use a plugin to upload a favicon.

But I searched for a method to make a smaller favicon and used the plugin. It worked! Thanks for the push.

Still, I'd like to know where it goes. Using a plugin to add a favicon (you don't need the plugin after it is uploaded) seems silly.

Thanks!

Offline

 

#5 2021-03-20 11:08:44

homdax
Member
Skåne, Sweden
2015-02-02
225

Re: Favicon not showing

Well you basically have two options

1. code and a custom image
2. plugin and certain limitations

I have used both depending on what site and what support I could find in regards to system, plugins, etc.

The most basic - and old - method is to have a image file in icon format that you drop at the sites root, and the browser should pick it up. No code required. Must be called favicon.ico .

Using code and META tags in the code lets you choose a PNG or GIF or SVG image and skips the ICO format requirement. You define the image path:

Code:

<link rel="shortcut icon" type="image/jpg" href="Favicon_Image_Location"/>

Very old doc:
https://www.w3.org/2005/10/howto-favicon

And then you have specs for defining favicons for different browser, like Apples Safari that may or may not require some extra tidbit of code.

A rather complex example: https://gist.github.com/cynthiapereira/5843674

Last edited by homdax (2021-03-20 11:10:02)

Offline

 

#6 2021-03-20 11:24:58

piwent
Member
2020-10-24
92

Re: Favicon not showing

I'm familiar with favicons. And even the perso favicon plugin is just putting it somewhere. Once the favicon is uploaded you can remove the plugin. So I am assuming it just needs to be in the right place.

In the header of one of my html pages it has

Code:

<link rel="shortcut icon" type="image/x-icon" href="themes/default/icon/favicon.ico">

But that's one of the places I already tried. I don't think Piwigo requires anything to be done with the code. That's why I was asking about location.

Offline

 

#7 2021-03-20 13:42:45

erAck
Only trying to help
2015-09-06
1415

Re: Favicon not showing

The plugin places a favicon.ico into the local/ directory. However, it merely being there is not sufficient (and a favicon.ico in the document root folder is overridden, which first hand I would not had expected and be inherited per default instead), the templated page headers need to be replaced because the Piwigo themes/default/icon/favicon.ico is used there, which is what the plugin does during page delivery. I'd guess one could also replace that file instead but it would get overwritten during an upgrade.

To overcome the hard coded 5k limit (other than editing source), just ignore the upload and directly place a local/favicon.ico file, a symbolic link to your root favicon.ico does as well. Or name it differently and in local config use

$conf['PersoFavicon'] = 'basename';

without .ico extension, the help page misleadingly says file name. With that, you could easily switch favicon to a different one on occasion.

The themes/default/icon/favicon.ico replacement in the templated pages does not support multiple size .ico files, one would have to change plugins/PersoFavicon/main.inc.php function Favicon() for that.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact