matpompili / flarum-imgur-upload
Enable the upload of images to imgur directly from the composer
Installs: 567
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 4
Forks: 12
Open Issues: 5
Language:JavaScript
Type:flarum-extension
Requires
- flarum/core: ^0.1.0-beta.3
This package is not auto-updated.
Last update: 2024-11-23 19:16:33 UTC
README
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.
Flarum is a free, open-source forum software built with PHP and Mithril.js.
Imgur is the best place to share and enjoy the most awesome images on the Internet.
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!
It uses the Markdown language to include images, so you can also copy the link for other purposes.
You can also choose to resize images down to a maximum size before upload, reducing uploading times!
Install
The only way to get flarum-imgur-upload is with composer: in your flarum folder run
composer require matpompili/flarum-imgur-upload
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).
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.
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.
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!