Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
Hi! I am trying to use the thumbnail tag to display a cropped image. I want the image automatically cropped for height AND width. For some reason, no matter what I do, it only crops one or the other.

This crops just the height: <cms:thumbnail proj_thumb height='150' enforce_max='1' />
And this just crops the width: <cms:thumbnail proj_thumb width='150' height='150' enforce_max='1' />

Shouldn't the second option be cropping both?

Thanks!

Nope,
enforce_max
Setting this parameter will cause Couch to simply scale (instead of cropping as in the example above) the thumbnail, ensuring that none of its two dimensions exceed those specfied by the width and height parameters

http://docs.couchcms.com/tags-reference ... nforce_max

For cropped output - remove that parameter and specify just width and height.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate

Got it, thank you!

Please let us know if it worked. And your problem is solved!
Image
where innovation meets technology

Yes, that solved it, thank you!

Great!
Problem Solved...

Feel free to ask any questions, we are here to help!
Image
where innovation meets technology
6 posts Page 1 of 1