assetUrl.js 331 B

123456789101112
  1. const ASSET_BASE_URL = 'https://transcend.ringzle.com/web/assets'
  2. const IMAGE_PATH = '/images/'
  3. function imageUrl(filename) {
  4. const normalizedFilename = String(filename || '').replace(/^\/+/, '')
  5. return `${ASSET_BASE_URL}${IMAGE_PATH}${encodeURIComponent(normalizedFilename)}`
  6. }
  7. module.exports = {
  8. ASSET_BASE_URL,
  9. imageUrl
  10. }