How to Enable Image Uploads in Flarum Forum Posts
By default, Flarum does not support direct image uploads in posts, but you can enable this feature using an extension. The recommended way is by installing the "FoF Upload" extension (Friends of Flarum Upload).
1️⃣ Install the FoF Upload Extension
To allow users to upload images and other files, install the FoF Upload extension using Composer.
🔹 Steps to Install (via SSH or Terminal)
1️⃣ Navigate to your Flarum installation directory
cd /path/to/flarum
```
2️⃣ Run the **composer command** to install FoF Upload:
```sh
composer require fof/upload
```
3️⃣ **Clear cache** and update dependencies:
```sh
php flarum cache:clear
php flarum migrate
2️⃣ Enable the Extension in Flarum Admin Panel
1️⃣ Log in to your Flarum Admin Panel
2️⃣ Go to Extensions
3️⃣ Find "FoF Upload" and click Enable
3️⃣ Configure Upload Settings
1️⃣ Navigate to Admin Panel → Extensions → FoF Upload Settings
2️⃣ Under Upload Methods, select "Local" (or choose AWS S3, Imgur, etc.)
3️⃣ Set allowed file types (e.g., .jpg, .png, .gif
)
4️⃣ Save your settings
4️⃣ Test Image Uploading in Forum Posts
1️⃣ Open a new post or discussion
2️⃣ Click the Upload button 📎 in the editor
3️⃣ Select an image and upload
4️⃣ It will be inserted as a BBCode or Markdown link
✅ Now users can upload images directly in posts! 🎉
5️⃣ Troubleshooting Issues
🔹 FoF Upload not showing?
- Run:
php flarum cache:clear
- Ensure the extension is enabled in Admin Panel → Extensions
🔹 Upload button missing in posts?
- Go to Admin Panel → Permissions
- Ensure the "Upload files" permission is enabled for users
6️⃣ Optional: Use Imgur for Image Hosting
If you don’t want to store images on your server, configure Imgur as a storage option:
1️⃣ Get an Imgur API Key from Imgur API
2️⃣ Enter the API key in FoF Upload Settings
3️⃣ Save settings and test image uploads
🎯 Conclusion
By installing and configuring FoF Upload, Flarum users can now easily upload and attach images in forum discussions. 🚀
Would you like help setting up other features like embedding videos or custom styling? Let me know! 😊