Puppeteer Service Github link

Image

Introduction

  • Image endpoint convers websites to images
  • You can see the original docs from here

Example

https://puppeteer-service.appysode.com/image?url=https://mrtgny.com&quality=10&type=jpeg&x=10&y=10&width=100&height=100&fullPage=false

Interface

interface PuppeteerService extends ScreenshotOptions {
  download?: boolean; // Default is false. If sets as true it downloads the file
  fileName?: string; // Default value is the url
  url: string;
}

// Supported parameters
interface ScreenshotOptions {
  type?: ImageType; // Default value is png
  fullPage?: boolean; // Default value is ture
  quality: number; // It works for png. A number between 0-100
  omitBackground?: boolean; // Default value is false
  clip?: ScreenshotClip;
}

declare type ImageType = "png" | "jpeg" | "webp";
declare interface ScreenshotClip {
  x: number;
  y: number;
  width: number;
  height: number;
}