Free forum plugin · one line of code
Add image uploads to your forum
Members click "Upload image", choose a picture, and the BBCode appears in their post. Works with phpBB, MyBB, SMF, XenForo and any site with a text box.
<script async src="https://imgsharehub.com/plugin/upload.js"></script>Where to paste the code
- phpBB 3.3
- Edit styles/prosilver/template/overall_footer.html, paste the code before </body>, then purge the cache in the ACP.
- MyBB 1.8
- ACP → Templates & Style → Templates → your theme → Footer Templates → footer. Paste the code at the end.
- SMF 2.1
- Edit Themes/default/index.template.php and paste the code before </body> in template_html_below().
- XenForo 2
- Admin → Appearance → Templates → PAGE_CONTAINER. Paste the code before </body>.
- Any other site
- Paste the code before </body> and add data-target="#your-textarea" to point it at your editor.
Settings
Add these attributes to the script tag to change how it works:
| Attribute | Values | Effect |
|---|---|---|
| data-target | CSS selector | Which textarea gets the button. Detected automatically on the forums above. |
| data-format | bbcode, bbcode-plain, html, markdown, direct | What is inserted. bbcode (default) links the image to its page. |
| data-label | Text | Button text. Default "Upload image". |
| data-expires | 1h, 1d, 1w, 1m, 6m | Auto-delete uploads after this time. Default: kept. |
<script async src="https://imgsharehub.com/plugin/upload.js"
data-target="#comment" data-format="markdown" data-expires="1w"></script>Building something custom?
Use the image hosting API for bots and apps, or see the BBCode guide for forum members.
Plugin questions
Is the forum plugin free?
Yes. There is no account, API key or payment needed. Uploads are rate limited per visitor to prevent abuse.
Does it use my forum's disk space or bandwidth?
No. Images are stored and served by ImgShareHub; your forum only stores the BBCode in the post.
What happens to large photos?
Photos over 4 MB are resized in the member's browser before upload to at most 2048 pixels, the same size ImgShareHub stores. Animated GIFs are uploaded as-is and must be under 4 MB.
Will images disappear from old posts?
Images are kept while they are being viewed. Anonymous images are only removed after 365 days with no views, unless you set data-expires.