Skip to content

BirchBrew/fetch_favicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fetch-favicon

Fetch a favicon with multiple fallbacks.

Full online documentation is available here.

You can find the package on Hex here.

For example.com it will first try example.com/favicon.ico, then it will try to find the icon file path in the HTML, and if it does, try to fetch that icon. If both fail, then it will query https://www.google.com/s2/favicons?domain=example.com

The image itself is returned.

To use

case FetchFavicon.fetch("google.com") do
  {:ok, image} -> use_image(image)
  {:error, error_message} -> use_error(error_message)
end

About

Fetch Favicons with multiple fallbacks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages