flyimg-flyimg

Namespace

flyimg-flyimg

Description:
  • An application that allows you to resize, crop, and compress images on the fly.

    By default, Flyimg generates the AVIF image format (when the browser supports it) which provides superior compression compared to other formats.

    Additionally, Flyimg also generates the WebP format, along with the impressive MozJPEG compression algorithm to optimize images, other formats are supported also such as PNG and GIF.

Author:
See:

Methods

(async, static) createFlyimgFlyimgInstance(context, body) → {FlyimgFlyimg}

Description:
  • Create a new flyimg instance

Example
import { Context } from '@osaas/client-core';
import { createFlyimgFlyimgInstance } from '@osaas/client-services';

const ctx = new Context();
const body: FlyimgFlyimgConfig = { name: 'myinstance', ... };
const instance = await createFlyimgFlyimgInstance(ctx, body);
console.log(instance.url);
Parameters:
Name Type Description
context Context

Open Source Cloud configuration context

body FlyimgFlyimgConfig

Service instance configuration

Returns:
  • Service instance
Type
FlyimgFlyimg

(async, static) getFlyimgFlyimgInstance(context, name) → {FlyimgFlyimg}

Description:
  • Get a flyimg instance

Example
import { Context } from '@osaas/client-core';
import { getFlyimgFlyimgInstance } from '@osaas/client-services';

const ctx = new Context();
const instance = await getFlyimgFlyimgInstance(ctx, 'myinstance');
console.log(instance.url);
Parameters:
Name Type Description
context Context

Open Source Cloud configuration context

name string

Name of the flyimg to be retrieved

Returns:
  • Service instance
Type
FlyimgFlyimg

(async, static) removeFlyimgFlyimgInstance(context, name)

Description:
  • Remove a flyimg instance

Parameters:
Name Type Description
context Context

Open Source Cloud configuration context

name string

Name of the flyimg to be removed