Image cropping stopped working

Wappler Version : 4.4.5
Operating System : Mac OS
Server Model: NodeJS
Database Type: MySQL
Hosting Type: Digital Ocean Droplet

Expected behavior

The server action has steps to check the image width/height, do a resize and crop the image.
This was working fine before the update.

Actual behavior

Cropping step is being skipped. Image retain their original aspect ratio

How to reproduce

Are you sure the condition is actually met?
Are there any errors in the dev tools?
Are the width and height properly returned (output them in setvalue steps to check this)

Hi Teodor,

yes, the conditions are met. The image is saved and stored in the cloud and added to the db.
Even is the conditions is not met, the cropping step is after the condition so it should do a crop no matter what.

This has been working for the last few months …

So:

No no errors

Maybe the sharp module is missing? Can you try resaving the server action?

that is what I thought and was the first thing I did. Opened the file, and resave

Can I check it somewhere?

I don’t see a sharp module in the modules folder

in the node_modules there is a sharp folder /module

I removed the condition and just let the crop do it’s thing on the large uploaded image (thus without resizing).
I get the following error:

  1. {status: “500”, message: “extract_area: bad extract area↵”,…}

  2. message: “extract_area: bad extract area\n”

  3. stack: “Error: extract_area: bad extract area\n”

  4. status: “500”

There seems to be something wrongly setup with the crop area.

I added it again just to be sure…

Perhaps of all odds, the image i use is corrupt… to be continued

I resaved the image in photoshop and then the cropping works…

The image I used I saved it from a Whattsapp conversation. Perhaps it gets flagged or something in Whattsapp. Something to figure out the coming days…

It seems like images made by my phone are not being cropped.

Resaving the image in Photoshop and upload it, that one is being cropped.

:thinking:

Every photo taken by my android phone is not being cropped.
Take this (fantastic!) image of my mouse for example. This one is taken by my phone, when uploading to my server, this one is not being cropped.
When I select an image taken by an iPhone or a random jpeg from the internet, the cropping works as expected. This is really an issue since I am not able to upload photos for testing with my mobile project on my phone.

Just curious, does it crop if you take a photo in landscape orientation?

Perhaps it isn’t cropping because your width is smaller than your setting.

Just thinking out loud. Never used the crop feature.

Do you get any errors from the cropping? Try to enable errors to show any

Keep thinking out loud Brad. Interestingly a horizontal image is being cropped. ;-S
Vertical photo made by my phone is not.
I tried separate the steps in 2 conditions, still the same