Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strapi-plugin-media-prefix

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strapi-plugin-media-prefix

Prepend media urls (images, files, audios, ) with your public url/media prefix on both Admin Panel and API's

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
146
increased by2.1%
Maintainers
1
Weekly downloads
 
Created
Source

strapi media prefix plugin Logo

Strapi Media Prefix Plugin

Prepend media urls (images, files, audios, ) with your public url/media prefix on both Admin Panel and API's

Prepend media url Screenshot

⚙️ Installation

npm install strapi-plugin-media-prefix
# or
yarn add strapi-plugin-media-prefix

✒️ Configuration

Enable the plugin by adding the following lines of code in the file: ./config/plugins.ts


export default () => ({
  "media-prefix": {
    enabled: true,
  },
});

or in the file: ./config/plugins.js

module.exports = {
  'media-prefix': {
    enabled: true,
  },
};

🌐 Server Config

The plugin get the public url/media prefix from the server config file: ./config/server.ts so be sure to add url key in the server config file

in the file: ./config/server.ts

export default ({ env }) => ({
  host: env('HOST', '0.0.0.0'),
  port: env.int('PORT', 1337),
  app: {
    keys: env.array('APP_KEYS'),
  },
  url: env('PUBLIC_URL', 'http://localhost:1337'), // be sure to add this line
});

or in the file: ./config/server.js

module.exports = ({ env }) => ({
  host: env('HOST', '0.0.0.0'),
  port: env.int('PORT', 1337),
  app: {
	keys: env.array('APP_KEYS'),
  },
  url: env('PUBLIC_URL', 'http://localhost:1337'), // be sure to add this line
});

Support

This package costs me time to make and maintain every time.

[I am very 😀 about every coffee!]

Buy Me A Coffee

Keywords

FAQs

Package last updated on 16 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc