A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/imgproxy/imgproxy-js-core below:

imgproxy/imgproxy-js-core: imgproxy-js-core package is designed to be used as part of framework-specific packages and plugins.

Website | Blog | Documentation | imgproxy Pro

imgproxy is a fast and secure standalone server for resizing and converting remote images. The main principles of imgproxy are simplicity, speed, and security. It is a Go application, ready to be installed and used in any Unix environment—also ready to be containerized using Docker.

imgproxy can be used to provide a fast and secure way to get rid of all the image resizing code in your web application (like calling ImageMagick or GraphicsMagick, or using libraries), while also being able to resize everything on the fly on a separate server that only you control. imgproxy is fast, easy to use, and requires zero processing power or storage from the main application. imgproxy is indispensable when handling image resizing of epic proportions, especially when original images are coming from a remote source.

imgproxy-js-core package is designed to be used as part of framework-specific packages and plugins.

npm install @imgproxy/imgproxy-js-core
import { generateUrl } from "@imgproxy/imgproxy-js-core";

const url = generateUrl(
  {
    value: "https://example.com/image.jpg",
    type: "plain",
  },
  {
    width: 150,
    height: 150,
    format: "webp",
    quality: 80,
    enlarge: "t",
    extend: {
      extend: 1,
      gravity: { type: "nowe", y_offset: 5 },
    },
    blur: 5,
    zoom: 1.5,
  }
);
generateUrl(URL, options)

This method generates an imgproxy URL based on the provided source and options.

The imgproxy-js-core library exposes a method called generateUrl, which takes two arguments:

For a detailed description of the available options, please refer to the imgproxy documentation, as well as the option types files in the imgproxy-js-core library.

The generateUrl method returns a string that contains the generated URL.

generateImageInfoUrl(URL, options)

This method ia available only for the PRO version of imgproxy.

This method generates an imgproxy URL based on the provided source and options.

The imgproxy-js-core library exposes a method called generateImageInfoUrl, which takes two arguments:

For a detailed description of the available options, please refer to the imgproxy documentation, as well as the option types files in the imgproxy-js-core library.

The generateImageInfoUrl method returns a string that contains the generated URL.

  1. Clone the repo
  2. Install dependencies
  1. Run dev server

The project uses changesets to manage versioning and changelog. Typical workflow is as follow:

  1. make changes to codebase,
  2. run npm run changesets at project root and follow prompt to generate a "changeset" (logging a change),
  3. commit both (1) and (2) into git.

The changesets Github action is triggered on push to main and will create a corresponding "Changesets: Versioning & Publication" pull request, which, upon merged, will trigger publication of the new version to NPM.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4