Reducing image file size

Reducing Image File Size
Previously, the ‘Edit Image’ node allowed users to reduce the file size of uploaded images by adjusting the quality setting.
This is no longer possible in this mode.
Is there an alternative way to reduce the file size of uploaded images?

Describe the problem/error/question

Reducing Image File Size
Previously, the ‘Edit Image’ node allowed users to reduce the file size of uploaded images by adjusting the quality setting.
This is no longer possible in this mode.
Is there an alternative way to reduce the file size of uploaded images?

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @UweG!

Which approach works best depends on how you’re running n8n and how many images you’re processing. What’s your setup?

You can try using an HTTP Request node to call a free image compression API like TinyPNG. You send the image, get a compressed version back.

Hope it helps :wink:

Hi @UweG Welcome!
Have you tried using the Edit Image Node? with resize operation? and then set output format to JPGEG , let me know if that helps.

Is there a way to retrieve the size format of the original image after uploading it?

For example, images can also be uploaded in portrait/landscape view, and I’d like to maintain the aspect ratio.

1 Like

@UweG Yes you can use that same Edit Image Node, with Get Information operation and with that it would return a lot of information about that image including dimensions, and once that is done you can compute those and then again use that node with Resize operation with options like Only if Large or Maximum Area option to maintain a standard aspect ratio.

Edit Image node is crazy:

Thank’s all for your help.
Found a solution, that works internal with n8n

1 Like