Need Help: While Automating Product Image Enhancement

Hello everyone,

I’m currently building a scenario where I want to automatically transform raw product images into stunning marketing visuals using AI.

The scenario I created this:

:backhand_index_pointing_right: Telegram Bot (send a photo) β†’ Telegram Bot (download a file) β†’ Pdf4me module (compress an image) β†’ Image module (convert a format) β†’ Image module (Resize) β†’ OpenAI module (Edit an image) β†’ Telegram Bot (send back the enhanced photo)

The error i faced is in the Image module (convert format) as shown " Operation 1 MaxFileSizeExceededError - The file is larger than the allowed max file size.

Could anyone guide me on:

  1. How to fix the error?
  2. Any tips for improving the scenario?

Thanks so much in advance for your help! :folded_hands:

Best,
Abdullah

Hey Abdullah,

according to the documentation, the image needs to be less than 3840 px in width and 2160 px in height. Either post smaller images or look for other alternatives to resize them.

How can I fix it then? Here I tried to send the photo as an attachment. because I tried to shot a photo direct from the telegram bot but it seems their servers reduce the image and loss it’s quality.