Skip Navigation

[Resolved] Display images in correct proportion

This support ticket is created 4 years, 11 months ago. 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
- 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/Karachi (GMT+05:00)

Author
Posts
#1529071

Hi!

My images always get cropped in squares and I can't seem to change that. I tried adressing them via CSS, e.g. with img.attachment-medium - nothing changes. You can find an example here: hidden link

What can I do?

Thanks a lot,
Tanja

#1530305

Hi Tanja,

Thank you for contacting us and I'd be happy to assist.

To troubleshoot this, I'll need to see exactly how this image is set up in the back-end.

Can you please share temporary admin login details in reply to this message?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1530521

Thank you for sharing the admin access.

I noticed that in your website's content template "Vorlage für Jubiläen", the shortcode is set to show the image(s) from the "Bild" field in the "medium" size thumbnail:


{!{types field='bild' title='%%TITLE%%' alt='%%ALT%%' size='medium' resize='crop' separator=', '}!}{!{/types}!}

And since the size of this thumbnail is set to 300 x 300 (width x height) in the media settings ( at WP Admin -> Settings -> Media ), the images are also shown in that same squarish size.

To keep showing these images in the same "medium" size thumbnail, while maintaining the actual width and height proportion, you can replace value "crop" with "proportional" in the "resize" attribute.


{!{types field='bild' title='%%TITLE%%' alt='%%ALT%%' size='medium' resize='proportional' separator=', '}!}{!{/types}!}

You can read more about the available shortcode attributes and their options at:
https://toolset.com/documentation/customizing-sites-using-php/functions/#image

I hope this helps and please let me know if you need any further assistance around this.

#1532127

Thank you, that was it! I would probably have searched forever...

Best,
Tanja