Skip Navigation

[Gelöst] Resizing images in content template by specifying a height only?

This support ticket is created vor 7 Jahre, 11 Monate. 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
- 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 3 Antworten, has 2 Stimmen.

Last updated by joshB-6 vor 7 Jahre, 11 Monate.

Assisted by: Minesh.

Author
Artikel
#400163
aMOmBZ.jpg

I am trying to: Set images to be scaled by height.
I have set up a view, however the images in the database are varying heights and widths.
I am trying to figure out how to set a height of the image and in turn have it scaled but what I have tried this far has not worked.
The shortcode I am using is

[types field="image" height="200" align="none" resize="proportional"][/types]

One other thing that I would like to have is that if a user clicks on the image, it will link them to the post that the image belongs to.

Pic attached to hopefully illustrate what i mean.

I look forward to your assistance.

Kind Regards.
Josh

#400192

Update:
I have mostly figured out the linking.

Sill need some assistance with the resizing of the image please.

#400304

Minesh
Supporter

Languages: Englisch (English )

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

Hello. Thank you for contacting the Toolset support.

What if you use "size" attribute with your image field.

For example:

types field="image" height="200" align="none" size="thumbnail"][/types]

You can see complete Documentation available for image field with the following URL:
https://toolset.com/documentation/customizing-sites-using-php/functions/#image

#400742

Thanks Minesh.

I ended up using max height with css.
The problem with using thumbnail as mentioned above is that the images in the archive are varying sizes, some are very long, some are not. Using thumbnail crops the images which is why i needed to specify max height.

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