Setting up your media source plugins
Example media source content block item:
Example media source in the media gallery:
name
is the user-facing name for your block and will be shown in the content block menu and in the media gallery itself. In the example above, the plugin name
is “Your plugin name”. Your name should be short, ideally one or two words.
description
is a short phrase describing your media source. It will appear underneath the name in the content block menu. In the example above this is set to “Short description for the plugin”.
sort order
determines their placement within both the media gallery and the content block menu. In the images above, “Your plugin name” has a sort order
of 0, while “Your plugin name 2” has a sort order
of 1.
logo
is an image for the element to be displayed alongside the name
and the description
. Only PNG, GIF, JPEG extensions are supported. The recommended size is 150x120px.
request URL
is the URL of an endpoint on your server that returns the list of images, complete with all the necessary properties to render the images in the gallery and place them within the email content for use by the creator.
You’ll generate this response based on the settings you’ve defined for your media source (outlined in the next section). Once a user completes all required settings, we’ll make a POST request to your request URL
.
The request will contain a settings
object with the user’s selected values for each of your search, filter, and sort settings, as well as pagination details, like so:
Query Parameters
name
configured for the plugin setting.search_group
, filter_group
, & sort_group
. Each group currently accepts a single setting that can be used by creators to filter and sort your content for ease of use.
Configuration with a search, filter and sort component could look like so: