42
Views
3
Comments
reactive image binary to screen size problem
Question

Hi guru's!

I have a question I store some images on a external file server and I use a OS rest api to fetch the files by SFTP and then expose the binary trough the rest api. In a reactive screen I use the link of the rest api to download the binary and show it to the user. Only when I copy the image from the browser and past it in for example whatsapp desktop or whatsapp web it says the file is exceeding the 16mb maximum. When I download the file to my computer and then use it, there is no problem. Any idea's on how to fix this?

2025-12-15 09-29-24
Thibaut G

To fix this issue, you can try implementing some form of compression or resizing on the server side before sending the image to the client.

UserImage.jpg
freek

Hi @Thibaut G, so I fetch the image by the url: https://xxx.outsystemscloud.com/DocumentServer_API/rest/DocumentServerDownload/DocumentServerDownload_File/IMG_20220131_154452?DocumentKey=dbd5b6be-ebd1-4825-9254-1d4da879aa00

This is a rest service that returns the binary of the image.

For some reason when I copy this image from the browser and paste it in whatsapp web it says its >16mb but when I download the image to my computer its only 4mb.

2025-12-15 09-29-24
Thibaut G

When using the download option, i suspect the image is being compressed automatically.
To compress your binary image file you can resize the image on the server side using this Forge Component and send the result to the client instead of the original result from your API.

Hope this clarifies

Kind Regards
Thibaut 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.