Skip to content

@indiekit/endpoint-media

Micropub media endpoint for Indiekit. Enables publishing media files (audio, photos, videos) to your website using the Micropub protocol.

Installation

npm install @indiekit/endpoint-media

NOTE

This package is installed alongside @indiekit/indiekit

Usage

To customise the behaviour of this plug-in, add @indiekit/endpoint-media to your configuration, specifying options as required:

jsonc
{
  "@indiekit/endpoint-media": {
    "imageProcessing": {
      "resize": {
        "width": 320,
        "height": 320,
      },
    },
    "mountPath": "/medien", // de-DE
  },
}

Options

OptionTypeDescription
imageProcessingobjectImage processing options. Only supports resizing for now.
imageProcessing.resizeobjectSharp image resizing options.
mountPathstringPath to listen to media upload requests. Optional, defaults to /media.

Supported endpoint queries

  • Previously published media: /media?q=source

    Supports filter, limit and offset and parameters. For example, /media?q=source&filter=web&limit=10&offset=10.