Skip Navigation

[Résolu] Types shortcode ignores image size parameter

This support ticket is created Il y a 6 années et 4 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 4 réponses, has 2 voix.

Last updated by davidS-53 Il y a 6 années et 4 mois.

Assisted by: Luo Yang.

Auteur
Publications
#557486
Screen Shot 2017-08-08 at 2.28.17 PM.png
Screen Shot 2017-08-08 at 2.28.29 PM.png
Screen Shot 2017-08-08 at 2.28.45 PM.png

Ive got a repeating image field which works fine. I've added size="medium" but types is still grabbing full-size images?

[wpv-for-each field="wpcf-work-photos"]
<div class="x-column x-sm x-1-3" style="padding: 0px;"><img class="x-img x-img-none" src="[types field="work-photos" output="raw" size="thumbnail"][/types]"></div>
[/wpv-for-each]

Any idea why this is?

#557571

Dear David,

The attribute "size" works only for custom image field, but you setup the custom field "work-photos" as a file field, so the attribute "size" does not work as you expected:
hidden link

I suggest you change it as a custom image field, and upload those images, and test again.

More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#image
https://toolset.com/documentation/customizing-sites-using-php/functions/#file

#558367
Screen Shot 2017-08-10 at 10.23.35 AM.png
Screen Shot 2017-08-10 at 10.21.14 AM.png
Screen Shot 2017-08-10 at 10.20.50 AM.png

OK, i've changed it to an image field, uploaded new images, and it's still ignoring the medium image size (see screenshots)

Any ideas why that would be?

#558405

I assume we are talking about the problem page:
hidden link
section "Our Work", I can see it does output medium image size in HTML source code, for example:

<a class="thickbox" href="<em><u>hidden link</u></em>"><img width="300" height="169" src="<em><u>hidden link</u></em>" class="attachment-medium" alt="" style="" title=""></a>

Can you confirm it? thanks

#558409

I've changed how it is set up, if you check the template. When I was using output="raw" it ignores the image size. Removed it, and it gets the correct image size.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.