Skip Navigation

[Resolved] tb-image class issue

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 1 reply, has 1 voice.

Last updated by nicolaS-3 1 week, 6 days ago.

Assisted by: Minesh.

Author
Posts
#2791979
tb-image issue.jpg

Hi all,
Today I have upgraded to WP 6.7.1 because I read that image issues were fixed. Then I checked all my website and I found out that Toolset Image block displays images abnormally. This is something you can easily replicate yourself. Create a new page and place a Toolset Image block and a WP Image block using the same image from library as source. You will see that in the block editor the two images look the same (correct) but viewing the page the image of the Toolset Image block is resized to the page size while the WP Image block displays its image at the original size. Selecting another image size in the Toolset Image block settings doesn't work.

Investigating the HTML of the Toolset Image block you will see that removing the tb-image class resizes the image to its correct size. I couldn't find which selector is guilty of this, I removed all of them individually, but nothing changes. Just removing the class works.
Moreover, zooming the page out, you will see that the Toolset Image block image looks squeezed, while the other is not (see picture).
As I extensively use the Toolset Image block could you please suggest a workaround so that I don't need to change all my images ?
thanks
Regards
Nicola

#2791988

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please try to add the following to "Custom Code" section offered by Toolset or to your current theme's functions.php file:

add_filter('wp_img_tag_add_auto_sizes', '__return_false');

More info:
- https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code/#benefits-of-adding-custom-code-using-toolset

I hope the above solution will help you to resolve your issue.

#2792006

Yes, it works,
thank you Minesh.
Kind regards
Nicola