We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question

Perch Image Resize in Different Templates

In my posts.html for my collection I have the following

    <perch:content id="postImageCard" type="image" label="Preview Image" required="true" bucket="case-studies" help="Image used to preview the article in cards" suppress="true" crop="true" />
    <perch:content id="postImageCard" type="image" label="Preview Image" bucket="case-studies" suppress="true" width="960" height="540" />

This gives my the original image size of 1920 x 1080 and a resized image of 960 x 540.

I then try to output the 960 x 540 in a listing template:

<perch:content id="postImageCard" width="960" height="540" crop="true" />

This however gives me the original image of 1920 x 1080. What am I doing wrong?

Dan Lee

Dan Lee 1 points

  • 2 years ago

Hi,

You don't have crop="true" in the original template, which might be the problem

Drew McLellan

Drew McLellan 2637 points
Perch Support

It is indeed the problem.