Passer la navigation

[Résolu] image size manipulation with shortcode

This support ticket is created Il y a 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 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Minesh Il y a 1 year, 8 months.

Assisté par: Minesh.

Auteur
Publications
#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

Les langues: Anglais (English )

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