flarum-imgur-upload
flarum-imgur-upload is a Flarum extension to support the upload of images to the popular website Imgur, and include the direct link of the image in the post., (*1)
Flarum is a free, open-source forum software built with PHP and Mithril.js., (*2)
Imgur is the best place to share and enjoy the most awesome images on the Internet., (*3)
Features
With flarum-imgur-upload you can attach as many images as you want while writing your post, and it will automatically add the link to the uploaded image in your post!, (*4)
It uses the Markdown language to include images, so you can also copy the link for other purposes., (*5)
You can also choose to resize images down to a maximum size before upload, reducing uploading times!, (*6)
Install
The only way to get flarum-imgur-upload is with composer: in your flarum folder run
composer require matpompili/flarum-imgur-upload
, (*7)
Configuration
Since flarum-imgur-upload uses Imgur API to upload your images, you will need an Imgur Client-ID. To get one simply register to the Imgur website, and register an application here.
You need to choose a name for your application (e.g. My Forum), and select OAuth 2 authorization without a callback URL (as shown below).
, (*8)
Once your application, which can be even your own website, has been registered, your Client-ID will be available here. Simply put it in the configuration of the extension, in your admin page., (*9)
From there you can also set the maximum image size. If images are bigger than that they will be resized (keeping aspect raio) before being uploaded., (*10)
Usage
While writing a post, or opening a new discussion, click on the Attach button. This will prompt the file chooser, if you're on a computer, or the gallery and/or camera if you're on mobile. After the image to upload has been selected, the uploading process will start (which may take some time, based on the image size and on connection quality). Once the process will be completed, the code to include the image will be automatically added in your composer. Have fun!, (*11)