+ %{
+ group: :pleroma,
+ key: :media_preview_proxy,
+ type: :group,
+ description: "Media preview proxy",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description:
+ "Enables proxying of remote media preview to the instance's proxy. Requires enabled media proxy."
+ },
+ %{
+ key: :thumbnail_max_width,
+ type: :integer,
+ description: "Max width of preview thumbnail."
+ },
+ %{
+ key: :thumbnail_max_height,
+ type: :integer,
+ description: "Max height of preview thumbnail."
+ },
+ %{
+ key: :image_quality,
+ type: :integer,
+ description: "Quality of the output. Ranges from 0 (min quality) to 100 (max quality)."
+ },
+ %{
+ key: :proxy_opts,
+ type: :keyword,
+ description: "Media proxy options",
+ suggestions: [
+ head_request_max_read_duration: 5_000
+ ],
+ children: [
+ %{
+ key: :head_request_max_read_duration,
+ type: :integer,
+ description: "Timeout (in milliseconds) of HEAD request to remote URI."
+ }
+ ]
+ },
+ %{
+ key: :whitelist,
+ type: {:list, :string},
+ description: "List of hosts with scheme to bypass the mediaproxy",
+ suggestions: ["http://example.com"]
+ }
+ ]
+ },