Skip Navigation

[Resolved] Template editor shows vertical image, but front end shows cropped to horizontal.

This thread is resolved. Here is a description of the problem and solution.

Problem:

Show vertical images in gallery. The looping template and content template come out ok, but the front end image shows up cropped to horizontal.

Solution:

In Toolset Image Block, there is a setting "Image Size", you can try the option "Scale the image without cropping to fit the width / height."

Relevant Documentation:

This support ticket is created 4 years, 10 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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by scottD-7 4 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1736405
Screen Shot 2020-08-12 at 11.43.16 AM.png

Tell us what you are trying to do?
Show vertical images in gallery. The looping template and content template come out ok, but the front end image shows up cropped to horizontal.

Is there any documentation that you are following?
No, just a looping view and content template.

Is there a similar example that we can see?
This painting is *supposed* to be vertical. But the generated page includes _wpcf and a different size.

What is the link to your site?
hidden link

#1737207
crop.JPG

Hello,

I assume we are talking about Toolset Image Block, setting "Image Size", you are using custom size: Resize to 640 * 480 + Crop and scale the image to fit the width and height without distortion.

What kind of "painting is *supposed* to be vertical" do you want?
Have you tried the option "Scale the image without cropping to fit the width / height."?
See my screenshot crop.JPG

#1737617

I wasn't using custom size, but it looks like the template is saved based upon whatever the current image is.

So now I've switched to custom size without cropping.

The good news is that the image page is now respecting orientation since it's not cropping.

The bad news is that the template *still* saves based upon the current image. And since vertical images are narrower, it's reduced the width.

So this gave me an idea. I found a square painting, so the template is now saving a square boundary to scale all images into.

My wish is that the template editor would let me manually edit the code to force a specific size.

#1737619

My issue is resolved now. Thank you!

If there's a way to manually edit the template code, please let me know.