Optidash Blog

New API feature: Image Flipping

New update: Image Flipping on our API. Easily flip images horizontally, vertically, or both. All official integrations updated for immediate use.

Today, we have pushed a quick and simple update to our image processing API - Image Flipping. With that operation you can flip (or mirror) your images horizontally, vertically or both. We have also updated all our official integrations so you can make use of image flipping right away.

A newly introduced top-level flip hash takes two, self explanatory, boolean parameters: horizontal and vertical:

{
    "flip": {
        "horizontal": true,
        "vertical": true
    }
}

Quick Example

Here’s a quick example of image flipping from within our Node integration:

const Optidash = require("optidash");

/**
* Instantiate `opti`
*/

const opti = new Optidash("your-api-key");

/**
* Provide a publicly available image URL with fetch(string) method
* and flip the image horizontally
*/

opti
    .fetch("https://www.website.com/image.jpg")
    .flip({
        horizontal: true
    })
    .toJSON((err, meta) => {
        if (err) {
            return console.log(err);
        }
    });

Have questions about using image flipping or requests for other features? Do not hesitate to contact us anytime.