Home › Toolset Professional Support › [Resolved] Toolset IMG field does not crop
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
This topic contains 12 replies, has 2 voices.
Last updated by Minesh 2 years, 7 months ago.
Assisted by: Minesh.
hidden link
I am trying to crop the images to 360x360 with
[types field='raam-o-maat-foto-gerecht' title='%%TITLE%%' alt='%%ALT%%' size='custom' width='360' resize='crop'][/types]
but still the full width images load, which creates unnecessary traffic.
Hello. Thank you for contacting the Toolset support.
What if you try to use the following shortcode:
[types field='raam-o-maat-foto-gerecht' title='%%TITLE%%' alt='%%ALT%%' size='custom' width='360' height='360' resize='crop'][/types]
Already tried that before, does not change anything 🙁
It seems your images are coming from the CDN and the images are not coming from the local server.
What if you go to: Toolset => Settings => Custom Content tab => Images section => select the option "Allow resizing of remote images " does that helps?
As the images are coming from the different server, may be you are using third-party plugin that offers the images using the CDN. You should try to run a test with all extra plugins disabled and with a default theme and see if the issue persists.
Hi,
I have disabled as many plugins as possible (WP Rocket, ShortPixel) and cleared all caches.
It seems only the first image looks like a WP Toolset cropped image, but the others aren't.
hidden link
Can you please share admin access details so I can check whats going wrong with your setup.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I checked by downloading the images you are using and I've uploaded to my test server and I tried to display it using the following shortcode on my install. It's the same shortcode just the field name is changed.
=> hidden link
[types field='session-photo' title='%%TITLE%%' alt='%%ALT%%' size='custom' width='360' height='360' resize='crop'][/types]
I can see all images are cropped correctly with specified dimensions: 360x360
On your site now I can see the 1st, 5th and 6th images are cropped:
=> hidden link
There must be either cache issue from your server. Can you please make sure the there is no server cache involved here.
I have purged and then disabled Bunnynet CDN.
I have purged and then disabled Varnish Cache.
I have cleared WP Rocket cache.
I have installed Breeze, purged cache and then remove the plugin.
I have no idea what more I can do.
Can you try to test on another server by uploading the same images as I did with my test site:
=> hidden link
It it working on another server, that means the issue on your server.
You can try following additional steps:
- memory (try to update memory, as you can see few images are able to crop and not others)
- please check and confirm: Toolset server requirements : https://toolset.com/toolset-requirements
- please check mbstring module is active on your server
- try to downgrade PHP to PHP 7.x.x
I have cloned the site to another Cloudways server hidden link and the images are immediately cropped. That is a PHP7 server instead of PHP8.
I know that Toolset isn't PHP8 ready yet (but come on, PHP8 has been out since Nov 2020!)
However, I am not sure the PHP version is the solution as you also noticed that some images were correctly cropped on the original server.
I have tried minimal setup (debug) with only Toolset and Toolset Views and still the images did not crop.
Before moving the site, can you confirm that this is in fact due to the PHP version?
Yes, it's the most possible candidate and the good news is that we are going to release the PHP 8 compatibility with Toolset plugin by this month end.
As of now that is the only solution to downgrade the PHP version to PHP 7.x.x and that is why we added additional note on our Toolset requirement's page that you will not see site working stable with PHP 8 as of now but in near future once we release the PHP 8 compatibility it will be sorted out.
I noticed that some images were still waiting to be processed in the Shortpixel plugin. They have now been processed and at least we now see webp versions of the images (still not cropped though).
I will wait then for the next Toolset update as it's a very high traffic site and we are a bit reluctant to move it.
But it's still strange that on PHP8 'some' of the images crop perfectly, while others don't. It should be all or nothing no?
Indeed its strange but its really hard to debug server issues as we do not have server access and we do not recommend to debug on production sites.
You may check with your server hosting authority if there is enough memory on server or its really due to PHP 8, otherwise wait for PHP 8 compatibility release or switch to PHP 7.x.x where its working normally.