1.0.3 • Published 6 months ago
@bou-co/optimizer-sanity-plugin v1.0.3
Bou Optimizer - Sanity Plugin
Use https://optimizer.bou.app/ inside your Sanity Studio to optimize images during upload.
Usage
Install the package from NPM:
npm i @bou-co/optimizer-sanity-pluginAdd the plugin in your Sanity Studio config:
// sanity.config.ts
import { defineConfig } from 'sanity';
import { structureTool } from 'sanity/structure';
import { schemaTypes } from './schemas';
// Import the "bouOptimizer" plugin
import { bouOptimizer } from '@bou-co/optimizer-sanity-plugin';
export default defineConfig({
projectId: '<projectId>',
dataset: 'production',
plugins: [
structureTool(),
// Add "bouOptimizer" as a plugin to your config
bouOptimizer(),
],
schema: {
types: schemaTypes,
},
});Use the new asset source from any file/image field: