Skip to content

Nostr Media Uploads for WordPress

Compare
Choose a tag to compare
@fabianfabian fabianfabian released this 28 Oct 07:13
· 20 commits to main since this release

Host images and media you post from your nostr client in your own WordPress installation using this plug-in.

New in 0.6

  • Add API Authorization checks for "method", "kind", "created_at", and "u"
  • API gives better feedback in the response if there is something wrong
  • Show warning at installation if post_max_size or upload_max_filesize is too low
  • Fixed: Unable to remove npub from WordPress user

Features

  • Upload media using HTTP Auth (NIP-98) and HTTP File Storage Integration (NIP-96)
  • Keeps original image and generates a scaled version
  • Media will also be available in your WordPress back-end on the Media page.

Installation

(Tutorial video here: https://nostur.com/v/nostr-media.mp4)

  1. In WordPress go to Plugins -> Add New -> Upload Plugin -> Choose nostr-media.zip -> Install Now -> Activate Plugin
  2. Go to Settings -> Permalinks -> Save Changes (don't change, just save, this will create routes needed)
  3. Go to Users -> Edit -> Nostr Media -> Public key (npub) -> Enter your npub here, this npub/user will be allowed to upload files to this WordPress installation. Click Update Profile to save.

Configuring a NIP96 compatible Nostr Client

  • Enter the URL of your WordPress installation as the File Storage Server address, eg: https://your-website.com
  • Happy uploading!

Troubleshooting

  • Make sure your WordPress installation allows large uploads, you can put this in your .htaccess
php_value upload_max_filesize 128M
php_value post_max_size 128M