Favicon Management

Favicon Management in FearlessCMS

Overview

FearlessCMS provides built-in favicon management through the admin interface, allowing you to easily set and manage your website's favicon without editing code.

🎯 What is a Favicon?

A favicon (favorite icon) is a small icon that appears in:

⚙️ Setting Your Favicon

Method 1: Through Admin Interface (Recommended)

  1. Upload Your Favicon

    • Go to Admin > Site Management > Site Settings
    • Use the "Choose File" button to upload your favicon
    • Supported formats: .ico, .png, .jpg, .gif, .svg (max 1MB)
    • The file will be automatically uploaded to the uploads/ directory
  2. Alternative: Manual Path Entry

    • If you prefer to upload manually, enter the path in the "Or enter path manually" field
    • Examples:
      • /uploads/favicon.ico
      • /uploads/favicon.png
      • https://example.com/favicon.ico
  3. Save Settings

    • Click "Save Settings"
    • Your favicon will immediately be available on your site

Features:

Method 2: Direct Configuration

Edit config/config.json:

{
    "site_name": "My Website",
    "site_description": "My awesome website",
    "site_url": "https://mywebsite.com",
    "favicon": "/uploads/favicon.ico"
}

📐 Favicon Best Practices

File Format Recommendations

Format Browser Support File Size Best For
.ico Excellent Medium General use
.png Excellent Small Modern browsers
.svg Good Very small Scalable icons

Size Recommendations

Naming Conventions

🎨 Creating Favicons

Online Tools

Design Tips

  1. Keep it Simple: Favicons are small, so use simple designs
  2. High Contrast: Ensure visibility on various backgrounds
  3. Brand Consistency: Match your website's branding
  4. Test Different Sizes: Verify readability at 16x16 pixels

🔧 Technical Implementation

Template Integration

FearlessCMS automatically includes favicon support in all themes. The favicon setting is available as /uploads/favicon_io/favicon.ico in templates:

<!-- Favicon -->
{{#if favicon}}
<link rel="icon" type="image/x-icon" href="/uploads/favicon_io/favicon.ico">
<link rel="apple-touch-icon" href="/uploads/favicon_io/favicon.ico">
{{else}}
<link rel="icon" type="image/x-icon" href="/favicon.ico">
{{/if}}

Fallback Behavior

Multiple Icon Sizes

For comprehensive favicon support, you can create multiple sizes:

<!-- Standard favicon -->
<link rel="icon" type="image/x-icon" href="/uploads/favicon_io/favicon.ico">

<!-- Apple touch icon -->
<link rel="apple-touch-icon" sizes="180x180" href="/uploads/apple-touch-icon.png">

<!-- Various sizes -->
<link rel="icon" type="image/png" sizes="32x32" href="/uploads/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/uploads/favicon-16x16.png">

🐛 Troubleshooting

Favicon Not Showing

  1. Check File Path: Ensure the path in site settings is correct
  2. File Permissions: Verify the favicon file is readable
  3. Browser Cache: Clear browser cache or try incognito mode
  4. File Format: Ensure the file format is supported

Common Issues

Issue: Favicon shows in some browsers but not others Solution: Use .ico format for maximum compatibility

Issue: Favicon appears blurry Solution: Use higher resolution source image (32x32 or 48x48)

Issue: Favicon doesn't update after changing settings Solution: Clear browser cache and wait a few minutes

📱 Mobile Considerations

Apple Touch Icons

For iOS devices, consider adding an apple-touch-icon:

<link rel="apple-touch-icon" href="/uploads/apple-touch-icon.png">

Android Chrome

Android Chrome uses the favicon for home screen shortcuts. Ensure your favicon is at least 192x192 pixels for best results.

🔄 Updating Your Favicon

  1. Upload New File: Replace the old favicon file
  2. Update Settings: Go to Site Settings and update the path if needed
  3. Clear Cache: Clear browser cache to see changes immediately
  4. Test: Verify the new favicon appears in browser tabs

📊 SEO Benefits

A proper favicon can improve your website's:

🎯 Summary

FearlessCMS makes favicon management simple:

  1. Easy Setup: Admin interface for configuration
  2. Universal Support: Works with all themes
  3. Flexible Paths: Support for relative and absolute URLs
  4. Fallback System: Automatic fallback to default favicon
  5. Best Practices: Follows web standards for favicon implementation

For more information, see the Getting Started Guide and Customization Overview.