ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

[Page attachments][Outlink] Option to get domain favicon #34177

Open processprocess opened 3 years ago

processprocess commented 3 years ago

A service can be used to fetch the outlink domain's favicon. This could be a value for cta-image like cta-image="favicon"

If the domain does not have a favicon configured, this could fallback to the default link icon.

prototype Replace the faviconURL param with any domain to preview the feature.

Concept approved by @hongcatlover

@ampproject/wg-stories

newmuis commented 3 years ago

I think we should seriously consider making this the default, instead of an additional parameter.

/cc @hongcatlover @raovs @gmajoulet

processprocess commented 3 years ago

I think we should seriously consider making this the default, instead of an additional parameter.

I'm leaning in that direction also.

processprocess commented 3 years ago

I'm not sure how we could detect if we need to default to a fallback if we use this service though. The request seems the same when it successfully gets a favicon and when it doesn't.

mszylkowski commented 3 years ago

The size of the icon when it fails is independent of the variable, maybe it's possible to catch this? Check the document title also, it says (16x16) even if the ?sz=64

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.