Forum
Page attributes in navigation - Image size
Hi,
I've created the following page attribute:
attributes/thumbnail.html
<perch:pages type="image" id="casestudy_thumb" label="Thumbnail" width="250" height="250" crop="true" suppress="true" divider-before="Case Study Thumbnail" />
I've then added this attribute to a custom navigation:
navigation/casestudies.html
<a href="<perch:pages id="pagePath" />"><img src="<perch:pages id="casestudy_thumb" encode="false" />" alt=" " /> <perch:pages id="pageNavText" /></a>
The image is displayed but at full size, not the cropped size set in the page attribute 250x250px. Can I change this?
Many thanks Michael
Hello Michael
I’ve done something similar, try using:
You might only need the width and not the height and crop too, but using them all should make sure it matches.
Hope that helps
Nick
That's it - the sizing options need to match so that Perch can find the right version of the image.
Thank you Nick & Drew, that did the trick.
Michael