Skip Navigation

[Resolved] Auto resizing of custom image fields in Bootstrap 4.0

This support ticket is created 5 years, 6 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by Gavin 5 years, 6 months ago.

Assisted by: Beda.

Author
Posts
#1305153
img-fluid.png

Hello

With Bootstrap 4.0 loaded, when inserting an image custom field, and I want it to be responsive in terms of size, I can select this option from the radio buttons but it does not appear to work (i.e. insert the right shortcode). I am adding the Bootstrap 4.0 class img-fluid to the shortcode to enable the image to be responsive - see screenshot.

Of course, it could be me missing something (it often is), but it might be worth checking out!

Cheers

Gavin

#1305475

Generally, images, if inserted with our ShortCodes, will simply follow your site's loaded scripts, and if Toolset loads Bootstrap 3 or 4, those become responsive - at least, that is how it works on my test installs.
I'd need to see an example to understand why on your end the images are not responsive, however locally, a simple [types field='image' title='%%TITLE%%' alt='%%ALT%%' size='full'][/types] will be responsive no matter whether the site uses Bootstrap 3 or 4.

I'm not aware of any setting that let you output responsive images in Toolset - neither with Bootstrap 4 or 3 - however, it is not needed as seen above since it just works.

The Image Field does output HTML too, that is correct, but only minimal Image HTML.
You can add your own CSS - but that seems not required to me when I test it locally.

Maybe if I can see the install and specific case, I can point out what I'm missing.

#1307809

My issue is resolved now. Thank you!