Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Is there a way to set couch to crop all images inserted in the editable type richtext to 500px if the image is bigger than that, else keep it's size?

Thanks!!
Alin,

Instead of 'crop', you'll have to use 'enforce_max' parameter for that (http://www.couchcms.com/docs/tags-refer ... image.html).

It wouldn't 'crop' the image (i.e. will not throw away any data from it) but will make sure that any image bigger than 500px in width is scaled down to 500px.

Perhaps that will help.
@KK, I think you missed the detail of "in the editable type richtext."

There's no way to crop or set a limit on the size of images uploaded in a richtext region, that I know of. The user will have to be responsible for that. The size of the image being shown on the page is managed through a dialogue in the richtext editor, but not the actual image being uploaded.

I once tried creating a completely different template just for uploading images. The user was meant to upload her images there, where they were resized for her. Then she could use them in the WYSIWYG. It was clumsy and not that great a solution. But I can't think of any other idea.

I gave that up and taught her to use the image editor on her computer instead.
@KK, I think you missed the detail of "in the editable type richtext."

My bad :oops:
Yes, I did miss that completely. Apologies.

I'll have to agree with Tim. There doesn't seem to be any clean solution for images within CKEditor.
4 posts Page 1 of 1