TinyPNG

TinyPNG uses smart lossy compression techniques to reduce the file size of your PNG files. By selectively decreasing the number of colors in the image, fewer bytes are required to store the data. The effect is nearly invisible but it makes a very large difference in file size! Join over 50.000 companies and developers around the world who are using the API.

Integrate the TinyPNG API with the Filter API

Setup the TinyPNG API trigger to run a workflow which integrates with the Filter API. Pipedream's integration platform allows you to integrate TinyPNG and Filter remarkably fast. Free for developers.

Compress Image with the TinyPNG API

Compress a WebP, JPEG, or PNG image using the TinyPNG API. See the documentation

 
Try it
Continue execution if a condition Is met with the Filter API

Continue workflow execution only if a condition is met

 
Try it
Convert Image with the TinyPNG API

Convert your images to your desired image type using TinyPNG. See the documentation

 
Try it
End execution if a condition is met with the Filter API

End workflow execution if a condition is met

 
Try it
Resize Image with the TinyPNG API

Create resized versions of your uploaded image. See the documentation

 
Try it

Overview of TinyPNG

The TinyPNG API lets you compress and optimize image files efficiently. With this API, you can shrink the size of PNG and JPEG files without a noticeable loss in quality, making it a crucial tool for improving website load times and saving bandwidth. On Pipedream, you can automate image optimization workflows, harnessing the power of TinyPNG to process batches of images, integrate with CMS platforms, trigger optimizations from various events, and more.

Connect TinyPNG

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module.exports = defineComponent({
  props: {
    tinypng: {
      type: "app",
      app: "tinypng",
    }
  },
  async run({steps, $}) {
    const results = await require("@pipedream/platform").axios($, {
      method: "post",
      url: `https://api.tinify.com/shrink`,
      auth: {
        username: `api:${this.tinypng.$auth.api_key}`,
        password: ``,
      },
      data: {
        "source": {
          "url": "https://tinypng.com/images/panda-happy.png"
        }
      },
    })

    const retVal = results.output
    retVal.original_image_metadata = results.input 
    return retVal
  },
})

Overview of Filter

The Filter API in Pipedream allows for real-time data processing within workflows. It's designed to evaluate data against predefined conditions, enabling workflows to branch or perform specific actions based on those conditions. This API is instrumental in creating efficient, targeted automations that respond dynamically to diverse datasets. Using the Filter API, you can refine streams of data, ensuring that subsequent steps in your Pipedream workflow only execute when the data meets your specified criteria. This cuts down on unnecessary processing and facilitates the creation of more intelligent, context-aware systems.

Connect Filter

1
2
3
4
5
6
7
8
9
10
export default defineComponent({
  async run({ steps, $ }) {
    let condition = false
    if (condition == false) {
      $.flow.exit("Ending workflow early because the condition is false")
    } else {
        $.export("$summary", "Continuing workflow, since condition for ending was not met.")
    }
  },
})