Skip Navigation

[Resolved] Custom sizing for images gives error – Zero size image string passed

This support ticket is created 2 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 9 replies, has 2 voices.

Last updated by vinceA 2 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#2407033
Screenshot 2022-06-28 at 15.13.20.jpg

Hello,

I am working on a new site and I have a new installation of Toolset on it.

I am seeing a problem when adding dynamic images in the block editor which I have never seen on my other installation.

I am trying to add a custom size to the image block so that all the images in the loop have the same dimensions but I am getting the following error: "Zero size image string passed". Please see attachment.

Do you know what this means and why it is happening?

Regards,
Charlie

#2407497

Hi Charlie,

Thank you for contacting us and I'd be happy to assist.

We've seen this error on another user's website and the issue was with the security plugin that changed the default admin URL.
( ref: https://toolset.com/forums/topic/error-message-trying-to-create-a-custom-image-size-in-view/ )

Can you please test this on your website with all non-Toolset plugins disabled and with a default theme like Twenty Twenty One?

If it's fixed, you can start adding the disabled items, one by one, to narrow down to a possible conflicting one.

I hope this helps and let me know how it goes.

regards,
Waqar

#2407659

Hi Waqar,

Thanks for your fast reply. I had a look through the thread that you sent me.

I know the plugin in question but I don't have it installed on this WP installation.

1. I created a duplicate site and tried deactivating all plugins, except toolset plugins. This didn't work.
2. I'm using Astra with a custom child theme, so I switched to the Astra parent theme. This didn't work.
3. I switched to Twenty Twenty-Two. This didn't work.
4. I turned off all Toolset plugins except for the Block Editor and Types. This didn't work.

Not sure where to go from here. Any ideas?

Perhaps I need to point out that all of this is being done on staging sites, created through the Softaculous WordPress Manager. Could this be the issue?

Charlie

#2407715

Thanks for writing back.

I don't think that the Softaculous WordPress Manager has anything to do with this.

Can you please share temporary admin login details, along with the link to the page where this error can be seen?

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

#2408901

Thank you for sharing the admin access.

In the template that you mentioned, I found an image block nested deep inside that is broken, because it is trying to get an image from seeming a non-existent field (author-profile-picture).
( screenshot: hidden link )

Can you please try removing that block and then test by adding a new image block?

#2409449

I just clicked the attempt block recovery button and it recovers without a problem. But this doesn't fix the problem.

Bear in mind that this problem is happening on every content template / page. You can create a brand new page and add a Toolset Image block with a dynamic source and it won't let you resize it.

#2410837

Thanks for writing back.

Your website is using the "HTTPS", but in the "WordPress Address (URL)" and "Site Address (URL)" fields, the address with "HTTP" is being used.
( at WP Admin -> Settings -> General )

Please update those fields to use "https" values and then check the image resizing again.

In case the issue persists, I'll need your permission to download a clone/snapshot of your website, to test this on a different server.

#2413161

Amazing! What great support Waqar. Thank you so much.

Can I ask you how you worked this out? It could have taken me years to find that on my own.

#2413593

Thanks for the update and glad that it is sorted now.

I saw some errors and warnings in the browser's console, which led to that conclusion.

WordPress uses these fields for the based URL and when there is a change in the protocol (HTTPS or HTTP), the generated URLs are treated as external links or links from a different website/domain.

Here is a helpful guide on reading errors and warnings from the browser's console:
https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/

#2413675

Awesome. Thank you so much for your help and for taking the time to explain this to me!