[SOLVED] Asset Service: cropping/resizing breaks image

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

When requesting the assets (both api and cdn), the resize/crop parameters are partly ignored and/or the resize-service breaks the image. As long as only a single param is provided it seems to work mostly (sometimes the param gets ignored and the original image is returned instead).

When providing both, width and height params, the service breaks the image, the image basically gets just scaled on one axis (getting squashed) (mostly => some ratios seem to work). Also the service does not respect the focus point set in squidex.

failed resized image 1:

failed resized image 2:

image not broken, but focus point ignored:

Expected behavior

the image should be resized with 1. match the requested format, 2. not getting destroyed 3. respecting the focus point.

Minimal reproduction of the problem

see the difference of both images:

Environment

  • [x] Cloud version

Browser:

  • [x] Chrome (desktop)

Can you upload me a screenshot where I can see the focus point?

I have uploaded the image library and it seems to be fixed now. Just need to verify the focus point, when I have your example.

BTW: The format is changed when you set to quality, then JPEG is always used. I see that it is not what you expect, but it would be a breaking change to change that. I can introduce a new parameter like keepFormat or so to toggle it of.

I can also reproduce the problem with the focus point and it is fixed. Will be deployed soon, but I cannot guarantee today.

Hi Sebastian

thanks for this fast answer.

Here’s how I set the focus point for https://cloud.squidex.io/api/assets/creaholic-website/4f29126d-bec1-4010-a9c8-b09deda499f8

I’ll test again next week and will let you know if all’s good.

Hi Sebastian

as far as I see the asset service is still the same way breaking the image.

Yes, it is not deployed yet, sorry

Hi Sebastian

It would be great to have this fix soon.
Also it’s a bit misleading when the ticket is marked as solved but not yet deployed.

Hi, I have uploaded it. There is a force parameter to generate new images:

e.g. https://assets.squidex.io/30eb7e3e-07ff-4bf8-bc6f-b69d1f1de3ba?width=600&height=150&force=true

Please use it only once.

Also it’s a bit misleading when the ticket is marked as solved but not yet deployed.

I understand that, but Squidex has several deployment methods, sometimes a fix is part of an official release but not part of the cloud version yet and vice versa.