Using SVG as the Top Logo in Flarum

4,714 0

Some users reported that PNGs are severely distorted on iPhones, so they thought of using SVG instead of PNG. SVG and vector graphics work on the same principle and can maintain excellent clarity on any device. After looking at the source code of Flarum Beta 8, it seems to support SVG. However, how can SVG be used on Beta 7? Read on.

Tutorial

Upload logo.svg to the /assets directory on the server, and change settings - logo_path in the database to logo.svg.

Then modify the forum.blade.php and admin.blade.php files. In the CV version, they are located in \vendor\flarum\core\views\frontend\; in older or other versions, they are located in \vendor\flarum\core\views\.

Change

HTML
<img src="{{ $logo }}" alt="{{ $title }}" class="Header-logo">

to

HTML
<img width="146" height="34" src="{{ $logo }}" alt="{{ $title }}" class="Header-logo">

The width and height can be adjusted as needed.

Example image

Comments

(0)

No comments yet. Start the conversation.

Leave a comment

© 2026 Carefree. All rights reserved.

Carefree is a personal site about technology and everyday life, documenting web development, backend, and DevOps practices, plus software tools, digital experiences, and thoughts beyond code.