Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Getty Images Editor Starter Kit

CE.SDK can include assets from third-party libraries accessible via API. Search and browse images from Getty Images in the editor. Built with CE.SDK by IMG.LY, runs entirely in the browser with no server dependencies (except for the Getty Images API proxy).

Documentation

Getty Images Editor starter kit showing stock photo integration

Getting Started

Clone the Repository

git clone https://github.com/imgly/starterkit-getty-asset-source-ts-web.git
cd starterkit-getty-asset-source-ts-web

Set Up Getty Images API Proxy

Getty Images API requires authentication that should be handled server-side. You'll need to set up a proxy server that:

  1. Handles Getty Images API authentication securely
  2. Accepts query parameters: query, page, perPage
  3. Returns data in CE.SDK AssetsQueryResult format

Copy .env.example to .env and add your proxy URL:

cp .env.example .env
# Edit .env and add your VITE_GETTY_IMAGES_PROXY_URL

Install Dependencies

npm install

Download Assets

CE.SDK requires engine assets (fonts, icons, UI elements) served from your public/ directory.

curl -O https://cdn.img.ly/packages/imgly/cesdk-js/$UBQ_VERSION$/imgly-assets.zip
unzip imgly-assets.zip -d public/
rm imgly-assets.zip

Run the Development Server

npm run dev

Open http://localhost:5173 in your browser.

Configuration

Getty Images Proxy URL

Set your proxy URL in one of two ways:

Environment Variable (Recommended)

# In your .env file
VITE_GETTY_IMAGES_PROXY_URL=https://your-proxy-server.com/getty-api

Programmatically

await initGettyImagesEditor(cesdk, {
  gettyProxyUrl: 'https://your-proxy-server.com/getty-api'
});

Customize Getty Images Integration

import { setupGettyImagesAssetSource } from './imgly/plugins/getty-images';

// Add Getty Images to an existing CE.SDK instance
setupGettyImagesAssetSource(cesdk, { proxyUrl: 'https://your-proxy-server.com/getty-api' });

Proxy Server Response Format

Your proxy server should return data in the CE.SDK AssetsQueryResult format:

interface AssetsQueryResult {
  assets: AssetResult[];
  total: number;
  currentPage: number;
  nextPage: number | undefined;
}

interface AssetResult {
  id: string;
  meta: {
    thumbUri: string;
    uri: string;
    width: number;
    height: number;
    mimeType: string;
  };
  credits?: {
    name: string;
    url: string;
  };
}

Loading Content

Load content into the editor using one of these methods:

// Create a blank design canvas
await cesdk.createDesignScene();

// Load from a template archive
await cesdk.load('https://example.com/template.zip');

// Load from a scene file
await cesdk.load('https://example.com/scene.json');

// Load from an image
await cesdk.createFromImage('https://example.com/image.jpg');

See Open the Editor for all loading methods.

Theming

cesdk.ui.setTheme('dark'); // 'light' | 'dark' | 'system'

See Theming for custom color schemes and styling.

Architecture

src/
├── imgly/
│   ├── config/
│   │   ├── actions.ts                # Export/import actions
│   │   ├── features.ts               # Feature toggles
│   │   ├── i18n.ts                   # Translations
│   │   ├── plugin.ts                 # Main configuration plugin
│   │   ├── settings.ts               # Engine settings
│   │   └── ui/
│   │       ├── canvas.ts                 # Canvas configuration
│   │       ├── components.ts             # Custom component registration
│   │       ├── dock.ts                   # Dock layout configuration
│   │       ├── index.ts                  # Combines UI customization exports
│   │       ├── inspectorBar.ts           # Inspector bar layout
│   │       ├── navigationBar.ts          # Navigation bar layout
│   │       └── panel.ts                  # Panel configuration
│   ├── index.ts                  # Editor initialization function
│   └── plugins/
│       └── getty-images.ts
└── index.ts

Key Capabilities

  • Getty Images Integration – Search and browse premium stock photos via API proxy
  • Text Editing – Typography with fonts, styles, and effects
  • Image Placement – Add, crop, and arrange images from Getty Images or uploads
  • Shapes & Graphics – Vector shapes and design elements
  • Templates – Start from pre-built design templates
  • Multi-Page – Create multi-page documents
  • Export – PNG, JPEG, PDF with quality controls

Prerequisites

  • Node.js v22+ with npm – Download
  • Getty Images API Proxy – Server-side proxy for Getty Images API authentication
  • Supported browsers – Chrome 114+, Edge 114+, Firefox 115+, Safari 15.6+

Troubleshooting

Issue Solution
"Please provide your Getty Images API proxy URL" alert Add VITE_GETTY_IMAGES_PROXY_URL to your .env file
Editor doesn't load Verify assets are accessible at baseURL
Assets don't appear Check public/assets/ directory exists
Watermark appears Add your license key
Getty Images not loading Check proxy server is running and accessible

Documentation

For complete integration guides and API reference, visit the Getty Images Editor Documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with CE.SDK by IMG.LY

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages