Navigation überspringen

[Gelöst] image size manipulation with shortcode

This support ticket is created vor 1 year, 8 months. 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
- 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 -

Zeitzone des Unterstützers: Asia/Kolkata (GMT+05:30)

Dieses Thema enthält 1 reply, hat 2 Stimmen.

Zuletzt aktualisiert von Minesh vor 1 year, 8 months.

Assistiert von: Minesh.

Author
Artikel
#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
Unterstützer

Sprachen: Englisch (English )

Zeitzone: 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]');