area17 / twill

Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
https://twillcms.com
Apache License 2.0
3.76k stars 574 forks source link

Incorrect crop when using TwicPics image service #1763

Open ghost opened 2 years ago

ghost commented 2 years ago

Description

After uploading some files and attaching them to a model, the crop is displayed incorrectly. This happens when using TwicPics as imageservice. On another model, with less roles, the image crops are shown and working correctly.

Are there any undocumented rules about using multiple roles & crop params?

The cms URL to display the image in the crop edit resizes the image to 100x430, which is obviously incorrect. https://783lf35u.twic.pics/images/833b06ad-1ca4-48ab-b1c6-4be4d2874eaa/44-photo-institut-des-croisements.jpg?twic=v1/quality=80/resize=100x430

The images that are working have resize=-x430 as parameter.

I'm using the default TwicPics config file.

Also, crops aren't saved for these images.

I already tried the refresh-crops command, but this doesn't change the behavior.

Does anybody have any suggestions on how to fix this?

Versions

Twill version: 2.8.8 Laravel version: 8.8 PHP version: 8

Screenshot 2022-08-03 at 23 22 00 Screenshot 2022-08-03 at 23 20 09 Screenshot 2022-08-03 at 23 19 57
ghost commented 2 years ago

I now noticed that the images are showing correctly until I attach a model in a browser form field with a thumbnail on the same admin form. I already tried renaming the role, but the issue remains. The width is somehow set fixed to 100px.