Christophe Posted March 5 Share Posted March 5 Hello, I'm converting again a website from another CMS to ProcessWire. On the old website, there are square thumbnail images that were created manually back then, if I remember well. The original images that I'm using again are in majority square images. But some are landscape images. There could also be portrait images. There will also be new images of different proportions. I can't get the rectangle images to be cropped and reduced in size to 75 px. The width is ok (in the case of landscape images of course) but the height is less than 75px. The shortest side should be 75px and the longest side (centered) cropped in order to be 75px. I am using Imagick by default, but I've also tried by setting its priority to 2 and 3. So I've tried with GD with config.php by enabling cropping and/or by trying different settings directly in the template. It doesn't change anything. A square variation could be created in the backend but I'd prefer it to be done via the api in this case. I'm not sure if I need to specify a condition where the height is not equal to the width of the image. I thought it would work automatically with size() and cropping activated. The cropping is normally centered by default if I'm not wrong (even though I've also tried by specifying it). Thank you in advance for your help, hints... If you need more details please let me know. I'm using ProcessWire 3.0.212 dev with PHP 7.4. Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now