ImageModule

Image - модуль-надстройка над nuxt/image под обе версии накста

Nuxt install

// nuxt.config.js
export default {
  buildModules: [
    'shared-front/nuxt/image',
  ],
  image: {
    ...
  },
};
// nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    'shared-front/nuxt/image',
  ],
  image: {
    ...
  },
});

Module options

Модуль лишь добавляет провайдер imgproxy, screens и preset поэтому основа опций в nuxt/image

import defaultBreakpoints from '#sf/modules/mq-handler/default-breakpoints.json';

export const getDefaultConfig = ({
  imgproxyPath,
}: {
  imgproxyPath: string;
}) => ({
  inject: false,
  providers: {
    imgproxy: {
      name: 'imgproxy',
      provider: imgproxyPath,
    },
  },
  screens: defaultBreakpoints,
  presets: {
    avatar: {
      modifiers: {
        // format: 'jpg',
        width: 80,
        height: 80,
      },
    },
  },
});

providers.imgproxy.options

interface ImageproxyOptions {
  baseURL: string;
  key?: string;
  salt?: string;
}

baseURL

Урл до инстанса imgproxy

key, salt

Ключ и соль для шифрования урла подробнее

Смотрите так-же