Skip to main content
Version: 3.x

TwicPics

This extension allow you to use Twicpics in your Front-Commerce store.

Prerequisites

Installation

Install the @front-commerce/twicpics package:

pnpm add @front-commerce/twicpics

Usage

Add the TwicPics extension to your front-commerce.config.ts:

front-commerce.config.ts
//...
import twicpics from "@front-commerce/twicpics";

export default defineConfig({
extensions: [
// ...
twicpics(),
],
//...
});

Configuration

In order to use TwicPics, you need to extend your app/config/images.js config.

  • domain (required): the Cloud Name of your TwicPics environment (see reference)
  • paths: paths which should be proxied to TwicPics. (see reference)
app/config/images.js
const config = {
twicpics: {
domain: "https://<domain>.twic.pics",
paths: [
{
source: "/media", // the source to match, (eg `/media` would match `/media/image.jpg`, or `https://my-domain.com/media` would match `https://my-domain.com/media/image.jpg`)
path: "/my-media", // the path configured in TwicPics as a path for the source.
},
],
},
};