#Fetching Favicon URL from Database for Admin UI

11 messages · Page 1 of 1 (latest)

dense parcelBOT
#

I was trying to fetch favicon graphics for the Admin UI but realized I can't use REST or the Local API in payload.config. Anyone ever try getting a favicon url from their database for the admin side?

hoary joltBOT
#

Original message from @elfin inlet - Moved from #general message

gleaming nexus
#

Hey @elfin inlet,

I imagine this can be done in a number of ways. If I understand you correctly, you want to use a, technically, remote favicon?

#

If this is the case, then you should upload your favicon to your bucket or storage location then simply grab the url directly to it. That should work for you here.

elfin inlet
#

Beyond just grabbing it manually, I want to be able to change it by creating a favicon field in a global, then calling that field and programmatically returning the (in my case) R2 URL to show it.

gleaming nexus
#

I imagine it's possible but not in config

#

This sounds like something you might need to do with js in a custom component

#

Which would inject the page with the favicon after a fetch to this global

#

Assuming you want to do this in the admin, on the frontend it would be probably similar

elfin inlet
#

thanks!