Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Is it possible to let the client upload an image without thinking about certain limitations (i.e. size).
while the cms itself compresses/saves as a web image?
(I used repeatable regions with images.)

A client seems to struggle to get her images from her camera into the cms without trouble.
The client really has no technical knowledge of any kind. so using some other tool to be able to upload seems like a struggle.
Hi,

When we set an explicit 'height' and 'width' for the 'image' type editable region, the CMS does process the uploaded image to make it the proper size before saving.

This processing, however, demands adequate memory on the server side.
If the server falls short of the required memory it results in the client getting a white-screen kind of problem.
This is something no CMS can really handle. You simply have to provide that amount of memory if you want to upload bigger images.

If that is possible then following are the settings that you can tweak to turn off the conservative size checks that Couch puts in place to prevent upload of images larger than what can (usually) be handled -

couch\includes\timthumb.php - find the following line and set the limit to something higher, say 128M or 256M
ini_set('memory_limit', "50M");

couch/includes/fileuploader/config.php -
// Maximum permissible size
$Config['k_max_upload_size'] = '2'; //Size in MB. Set to '0' to allow any size.

You might also have to tweak your server's php.ini for the maximum upload size.

Hope this helps.
Thanks, will look into this.

Since I defined a height or width, to keep things in proportion, the resolution of the image itself shouldn't be a problem while camera's default capture at 72dpi (for screen). Compression is handled by the "quality" parameter for the image-type I assume as covered: here.

edit: Excellent, thumbs up once again, works perfectly! 8-)

as as sidenote: images only get processed while the post is actually saved and not when the image is uploaded. So uploading several images without saving, can result in delay...
3 posts Page 1 of 1