Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

390 B
Raw Blame
import { backendUrl } from "../lib/client"

export default function imagesConverter(images: string) {
  const isLocalhost =
    images.startsWith("http://localhost:9000") ||
    images.startsWith("https://localhost:9000")

  if (isLocalhost) {
    return images
      .replace("http://localhost:9000", backendUrl)
      .replace("https://localhost:9000", backendUrl)
  }

  return images
}