Skip Navigation

[Resolved] image size manipulation with shortcode

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 2 voices.

Last updated by Minesh 2 months ago.

Assisted by: Minesh.

Author
Posts
#2778125

Tell us what you are trying to do?
I want to integrate an image into my Template that I defined in a CPT
Is there any documentation that you are following?
ChatGPT
Is there a similar example that we can see?
havent found one
What is the link to your site?
riva.aprimus.de

here is the code that i tried:

echo do_shortcode('[types field="headerbild" item="21" output="image" image_size="thumbnail"][/types]');

It returns the image correctly but in the wrong size.

#2778156

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Actually - as you can see with the image field attribute section:
- https://toolset.com/documentation/customizing-sites-using-php/functions/#image

The correct attribute you should use is "size" not "image_size":

So, what if you try to use the following shortcode:

echo do_shortcode('[types field="headerbild" item="21" output="image" size="thumbnail"][/types]');